pub fn process_generate_template<O>(out: std::sync::Arc<O>,opt: GenerateTemplateOpt) -> Result<(), CliError> 
    where O: Terminal
{
    let json = match opt.request {
        RequestApi::ApiVersions => serde_json::to_string_pretty(&KfApiVersionsRequest::default()),
        RequestApi::ListOffset => serde_json::to_string_pretty(&KfListOffsetRequest::default()),
        RequestApi::Metadata => serde_json::to_string_pretty(&KfMetadataRequest::default()),
        RequestApi::LeaderAndIsr => serde_json::to_string_pretty(&KfLeaderAndIsrRequest::default()),
        RequestApi::FindCoordinator => {
            serde_json::to_string_pretty(&KfFindCoordinatorRequest::default())
        }
        RequestApi::JoinGroup => serde_json::to_string_pretty(&KfJoinGroupRequest::default()),
        RequestApi::SyncGroup => serde_json::to_string_pretty(&KfSyncGroupRequest::default()),
        RequestApi::LeaveGroup => serde_json::to_string_pretty(&KfLeaveGroupRequest::default()),
        RequestApi::DescribeGroups => {
            serde_json::to_string_pretty(&KfDescribeGroupsRequest::default())
        }
        RequestApi::ListGroups => serde_json::to_string_pretty(&KfListGroupsRequest::default()),
        RequestApi::DeleteGroups => serde_json::to_string_pretty(&KfDeleteGroupsRequest::default()),
        RequestApi::Heartbeat => serde_json::to_string_pretty(&KfHeartbeatRequest::default()),
        RequestApi::OffsetFetch => serde_json::to_string_pretty(&KfOffsetFetchRequest::default()),
    };

    let result = json.map_err(|err| IoError::new(ErrorKind::InvalidData, format!("{}", err)))?;
    t_println!(out,"{}", result);

    Ok(())
}
/// Parse request API and generate template
Parse request API and generate template
Parse request API and generate template
pub fn process_generate_template<O>(out: std::sync::Arc<O>,opt: GenerateTemplateOpt) -> Result<(), CliError> 
    where O: Terminal
{
    let json = match opt.request {
        RequestApi::ApiVersions => serde_json::to_string_pretty(&KfApiVersionsRequest::default()),
        RequestApi::ListOffset => serde_json::to_string_pretty(&KfListOffsetRequest::default()),
        RequestApi::Metadata => serde_json::to_string_pretty(&KfMetadataRequest::default()),
        RequestApi::LeaderAndIsr => serde_json::to_string_pretty(&KfLeaderAndIsrRequest::default()),
        RequestApi::FindCoordinator => {
            serde_json::to_string_pretty(&KfFindCoordinatorRequest::default())
        }
        RequestApi::JoinGroup => serde_json::to_string_pretty(&KfJoinGroupRequest::default()),
        RequestApi::SyncGroup => serde_json::to_string_pretty(&KfSyncGroupRequest::default()),
        RequestApi::LeaveGroup => serde_json::to_string_pretty(&KfLeaveGroupRequest::default()),
        RequestApi::DescribeGroups => {
            serde_json::to_string_pretty(&KfDescribeGroupsRequest::default())
        }
        RequestApi::ListGroups => serde_json::to_string_pretty(&KfListGroupsRequest::default()),
        RequestApi::DeleteGroups => serde_json::to_string_pretty(&KfDeleteGroupsRequest::default()),
        RequestApi::Heartbeat => serde_json::to_string_pretty(&KfHeartbeatRequest::default()),
        RequestApi::OffsetFetch => serde_json::to_string_pretty(&KfOffsetFetchRequest::default()),
    };
    let result = json.map_err(|err| IoError::new(ErrorKind::InvalidData, format!("{}", err)))?;
    t_println!(out,"{}", result);
    Ok(())
}
pub fn process_generate_template < O > ( out : std :: sync :: Arc < O > , opt : GenerateTemplateOpt ) -> Result < ( ) , CliError > where O : Terminal { let json = match opt . request { RequestApi :: ApiVersions => serde_json :: to_string_pretty ( & KfApiVersionsRequest :: default ( ) ) , RequestApi :: ListOffset => serde_json :: to_string_pretty ( & KfListOffsetRequest :: default ( ) ) , RequestApi :: Metadata => serde_json :: to_string_pretty ( & KfMetadataRequest :: default ( ) ) , RequestApi :: LeaderAndIsr => serde_json :: to_string_pretty ( & KfLeaderAndIsrRequest :: default ( ) ) , RequestApi :: FindCoordinator => { serde_json :: to_string_pretty ( & KfFindCoordinatorRequest :: default ( ) ) } RequestApi :: JoinGroup => serde_json :: to_string_pretty ( & KfJoinGroupRequest :: default ( ) ) , RequestApi :: SyncGroup => serde_json :: to_string_pretty ( & KfSyncGroupRequest :: default ( ) ) , RequestApi :: LeaveGroup => serde_json :: to_string_pretty ( & KfLeaveGroupRequest :: default ( ) ) , RequestApi :: DescribeGroups => { serde_json :: to_string_pretty ( & KfDescribeGroupsRequest :: default ( ) ) } RequestApi :: ListGroups => serde_json :: to_string_pretty ( & KfListGroupsRequest :: default ( ) ) , RequestApi :: DeleteGroups => serde_json :: to_string_pretty ( & KfDeleteGroupsRequest :: default ( ) ) , RequestApi :: Heartbeat => serde_json :: to_string_pretty ( & KfHeartbeatRequest :: default ( ) ) , RequestApi :: OffsetFetch => serde_json :: to_string_pretty ( & KfOffsetFetchRequest :: default ( ) ) , } ; let result = json . map_err ( | err | IoError :: new ( ErrorKind :: InvalidData , format ! ( " " err ) ) ) ? ; t_println ! ( out " " result ) ; Ok ( ( ) ) }
Parse request API and generate template
Parse request API and generate template
out
std::sync::Arc<O>
opt
GenerateTemplateOpt
out
std::sync::Arc<O>
opt
GenerateTemplateOpt