use super::debug_contracts::LoggingSchemaDebugReport;
use super::debug_report_output_assembly_from_stage_output_assembly::build_logging_schema_debug_report_from_output_assembly_from_stage_output_assembly;
use super::debug_report_output_assembly_stage_input_assembly::build_debug_report_output_assembly_stage_input_assembly;
use super::debug_report_output_assembly_stage_input_contracts::LoggingSchemaDebugReportOutputAssemblyStageInput;
use super::debug_report_output_assembly_stage_output_assembly::build_debug_report_output_assembly_stage_output_assembly;
use super::debug_report_output_input_contracts::LoggingSchemaDebugReportOutputInput;
use super::debug_report_output_metadata_assembly::build_logging_schema_debug_report_output_metadata;
use super::debug_report_output_observed_sort_stage::build_debug_report_output_sorted_observed_tables;
pub(super) fn build_logging_schema_debug_report_from_input(
input: LoggingSchemaDebugReportOutputInput,
) -> LoggingSchemaDebugReport {
let LoggingSchemaDebugReportOutputInput {
logging_client,
summary,
evaluation,
still_needed,
observed_map,
} = input;
let observed_tables = build_debug_report_output_sorted_observed_tables(observed_map);
let output_metadata =
build_logging_schema_debug_report_output_metadata(&still_needed, observed_tables);
let stage_input: LoggingSchemaDebugReportOutputAssemblyStageInput =
build_debug_report_output_assembly_stage_input_assembly(
logging_client,
summary,
evaluation,
still_needed,
output_metadata,
);
let stage = build_debug_report_output_assembly_stage_output_assembly(stage_input);
build_logging_schema_debug_report_from_output_assembly_from_stage_output_assembly(stage)
}