use super::super::peer_site::PeerSiteTraceInputs;
use crate::inspect::smp::services::*;

pub(super) struct PeerSiteReportFields {
    pub(super) peer_site_selector_candidate_owner_strip: String,
    pub(super) peer_site_selector_candidate_persisted_tag_hex: String,
    pub(super) peer_site_selector_candidate_selector_lane: String,
    pub(super) peer_site_selector_candidate_secondary_payload_lane: String,
    pub(super) peer_site_selector_candidate_post_secondary_byte_status: String,
    pub(super) peer_site_selector_candidate_class_identity_status: String,
    pub(super) peer_site_selector_candidate_helper_linkage: Vec<String>,
    pub(super) peer_site_selector_candidate_saved_payload_summaries:
        Vec<SmpSavePlacedStructureProfilePayloadSummaryEntry>,
    pub(super) peer_site_selector_candidate_saved_payload_delta_summaries:
        Vec<SmpSavePlacedStructureProfilePayloadDeltaSummaryEntry>,
    pub(super) peer_site_selector_candidate_saved_footer_padding_summaries:
        Vec<SmpSavePlacedStructureProfileFooterPaddingSummaryEntry>,
    pub(super) peer_site_selector_candidate_saved_companion_byte_summaries:
        Vec<SmpSavePlacedStructureProfileCompanionByteSummaryEntry>,
    pub(super) peer_site_selector_candidate_saved_policy_trailing_word_summaries:
        Vec<SmpSavePlacedStructurePolicyTrailingWordSummaryEntry>,
    pub(super) peer_site_selector_candidate_saved_nonzero_companion_name_pair_summaries:
        Vec<SmpSavePlacedStructureNonzeroCompanionNamePairSummaryEntry>,
    pub(super) peer_site_selector_candidate_saved_nonzero_companion_building_family_overlap_summaries:
        Vec<SmpSavePlacedStructureNonzeroCompanionBuildingFamilyOverlapSummaryEntry>,
    pub(super) peer_site_selector_candidate_saved_nonzero_companion_building_family_residue_summaries:
        Vec<SmpSavePlacedStructureNonzeroCompanionBuildingFamilyResidueSummaryEntry>,
    pub(super) peer_site_persisted_selector_bundle_fields: Vec<String>,
    pub(super) peer_site_rebuilt_transient_followon_fields: Vec<String>,
    pub(super) peer_site_shellless_minimum_persisted_identity_status: String,
    pub(super) peer_site_shellless_minimum_persisted_identity_inputs: Vec<String>,
    pub(super) peer_site_restore_input_fields: Vec<String>,
    pub(super) peer_site_runtime_input_fields: Vec<String>,
    pub(super) peer_site_runtime_reconstruction_status: String,
    pub(super) peer_site_runtime_reconstruction_steps: Vec<String>,
}

pub(super) fn build_peer_site_report_fields(inputs: &PeerSiteTraceInputs) -> PeerSiteReportFields {
    PeerSiteReportFields {
        peer_site_selector_candidate_owner_strip: inputs
            .peer_site_selector_candidate_owner_strip
            .clone(),
        peer_site_selector_candidate_persisted_tag_hex: inputs
            .peer_site_selector_candidate_persisted_tag_hex
            .clone(),
        peer_site_selector_candidate_selector_lane: inputs
            .peer_site_selector_candidate_selector_lane
            .clone(),
        peer_site_selector_candidate_secondary_payload_lane: inputs
            .peer_site_selector_candidate_secondary_payload_lane
            .clone(),
        peer_site_selector_candidate_post_secondary_byte_status: inputs
            .peer_site_selector_candidate_post_secondary_byte_status
            .clone(),
        peer_site_selector_candidate_class_identity_status: inputs
            .peer_site_selector_candidate_class_identity_status
            .clone(),
        peer_site_selector_candidate_helper_linkage: inputs
            .peer_site_selector_candidate_helper_linkage
            .clone(),
        peer_site_selector_candidate_saved_payload_summaries: inputs
            .peer_site_selector_candidate_saved_payload_summaries
            .clone(),
        peer_site_selector_candidate_saved_payload_delta_summaries: inputs
            .peer_site_selector_candidate_saved_payload_delta_summaries
            .clone(),
        peer_site_selector_candidate_saved_footer_padding_summaries: inputs
            .peer_site_selector_candidate_saved_footer_padding_summaries
            .clone(),
        peer_site_selector_candidate_saved_companion_byte_summaries: inputs
            .peer_site_selector_candidate_saved_companion_byte_summaries
            .clone(),
        peer_site_selector_candidate_saved_policy_trailing_word_summaries: inputs
            .peer_site_selector_candidate_saved_policy_trailing_word_summaries
            .clone(),
        peer_site_selector_candidate_saved_nonzero_companion_name_pair_summaries: inputs
            .peer_site_selector_candidate_saved_nonzero_companion_name_pair_summaries
            .clone(),
        peer_site_selector_candidate_saved_nonzero_companion_building_family_overlap_summaries:
            inputs
                .peer_site_selector_candidate_saved_nonzero_companion_building_family_overlap_summaries
                .clone(),
        peer_site_selector_candidate_saved_nonzero_companion_building_family_residue_summaries:
            inputs
                .peer_site_selector_candidate_saved_nonzero_companion_building_family_residue_summaries
                .clone(),
        peer_site_persisted_selector_bundle_fields: inputs
            .peer_site_persisted_selector_bundle_fields
            .clone(),
        peer_site_rebuilt_transient_followon_fields: inputs
            .peer_site_rebuilt_transient_followon_fields
            .clone(),
        peer_site_shellless_minimum_persisted_identity_status: inputs
            .peer_site_shellless_minimum_persisted_identity_status
            .clone(),
        peer_site_shellless_minimum_persisted_identity_inputs: inputs
            .peer_site_shellless_minimum_persisted_identity_inputs
            .clone(),
        peer_site_restore_input_fields: inputs.peer_site_restore_input_fields.clone(),
        peer_site_runtime_input_fields: inputs.peer_site_runtime_input_fields.clone(),
        peer_site_runtime_reconstruction_status: inputs
            .peer_site_runtime_reconstruction_status
            .clone(),
        peer_site_runtime_reconstruction_steps: inputs
            .peer_site_runtime_reconstruction_steps
            .clone(),
    }
}
