pub async fn find_pets_by_status(configuration: &configuration::Configuration, params: FindPetsByStatusParams) -> Result<ResponseContent<FindPetsByStatusSuccess>, Error<FindPetsByStatusError>> {
    // unbox the parameters
    let status = params.status;


    let client = &configuration.client;

    let uri_str = format!("{}/pet/findByStatus", configuration.base_path);
    let mut req_builder = client.get(uri_str.as_str());

    req_builder = req_builder.query(&[("status", &status.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]);
    if let Some(ref user_agent) = configuration.user_agent {
        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
    }
    if let Some(ref token) = configuration.oauth_access_token {
        req_builder = req_builder.bearer_auth(token.to_owned());
    };

    let req = req_builder.build()?;
    let resp = client.execute(req).await?;

    let status = resp.status();
    let content = resp.text().await?;

    if status.is_success() {
        let entity: Option<FindPetsByStatusSuccess> = serde_json::from_str(&content).ok();
        let result = ResponseContent { status, content, entity };
        Ok(result)
    } else {
        let entity: Option<FindPetsByStatusError> = serde_json::from_str(&content).ok();
        let error = ResponseContent { status, content, entity };
        Err(Error::ResponseError(error))
    }
}
/// Multiple status values can be provided with comma separated strings
Multiple status values can be provided with comma separated strings
Multiple status values can be provided with comma separated strings
pub async fn find_pets_by_status(configuration: &configuration::Configuration, params: FindPetsByStatusParams) -> Result<ResponseContent<FindPetsByStatusSuccess>, Error<FindPetsByStatusError>> {
    // unbox the parameters
    let status = params.status;
    let client = &configuration.client;
    let uri_str = format!("{}/pet/findByStatus", configuration.base_path);
    let mut req_builder = client.get(uri_str.as_str());
    req_builder = req_builder.query(&[("status", &status.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]);
    if let Some(ref user_agent) = configuration.user_agent {
        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
    }
    if let Some(ref token) = configuration.oauth_access_token {
        req_builder = req_builder.bearer_auth(token.to_owned());
    };
    let req = req_builder.build()?;
    let resp = client.execute(req).await?;
    let status = resp.status();
    let content = resp.text().await?;
    if status.is_success() {
        let entity: Option<FindPetsByStatusSuccess> = serde_json::from_str(&content).ok();
        let result = ResponseContent { status, content, entity };
        Ok(result)
    } else {
        let entity: Option<FindPetsByStatusError> = serde_json::from_str(&content).ok();
        let error = ResponseContent { status, content, entity };
        Err(Error::ResponseError(error))
    }
}
pub async fn find_pets_by_status ( configuration : & configuration :: Configuration , params : FindPetsByStatusParams ) -> Result < ResponseContent < FindPetsByStatusSuccess > , Error < FindPetsByStatusError > > { // unbox the parameters let status = params . status ; let client = & configuration . client ; let uri_str = format ! ( " " configuration base_path ) ; let mut req_builder = client . get ( uri_str . as_str ( ) ) ; req_builder = req_builder . query ( & [ ( " " , & status . into_iter ( ) . map ( | p | p . to_string ( ) ) . collect :: < Vec < String > > ( ) . join ( " " ) . to_string ( ) ) ] ) ; if let Some ( ref user_agent ) = configuration . user_agent { req_builder = req_builder . header ( reqwest :: header :: USER_AGENT , user_agent . clone ( ) ) ; } if let Some ( ref token ) = configuration . oauth_access_token { req_builder = req_builder . bearer_auth ( token . to_owned ( ) ) ; } ; let req = req_builder . build ( ) ? ; let resp = client . execute ( req ) . await ? ; let status = resp . status ( ) ; let content = resp . text ( ) . await ? ; if status . is_success ( ) { let entity : Option < FindPetsByStatusSuccess > = serde_json :: from_str ( & content ) . ok ( ) ; let result = ResponseContent { status , content , entity } ; Ok ( result ) } else { let entity : Option < FindPetsByStatusError > = serde_json :: from_str ( & content ) . ok ( ) ; let error = ResponseContent { status , content , entity } ; Err ( Error :: ResponseError ( error ) ) } }
Multiple status values can be provided with comma separated strings
Multiple status values can be provided with comma separated strings
configuration
&configuration::Configuration
params
FindPetsByStatusParams
configuration
&configuration::Configuration
params
FindPetsByStatusParams