// This file was generated by gir (https://github.com/gtk-rs/gir)
// from
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use crate::ffi;
use glib::translate::*;

glib::wrapper! {
    #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
    pub struct MessageMetrics(Boxed<ffi::SoupMessageMetrics>);

    match fn {
        copy => |ptr| ffi::soup_message_metrics_copy(mut_override(ptr)),
        free => |ptr| ffi::soup_message_metrics_free(ptr),
        type_ => || ffi::soup_message_metrics_get_type(),
    }
}

impl MessageMetrics {
    #[doc(alias = "soup_message_metrics_get_connect_end")]
    #[doc(alias = "get_connect_end")]
    pub fn connect_end(&mut self) -> u64 {
        unsafe { ffi::soup_message_metrics_get_connect_end(self.to_glib_none_mut().0) }
    }

    #[doc(alias = "soup_message_metrics_get_connect_start")]
    #[doc(alias = "get_connect_start")]
    pub fn connect_start(&mut self) -> u64 {
        unsafe { ffi::soup_message_metrics_get_connect_start(self.to_glib_none_mut().0) }
    }

    #[doc(alias = "soup_message_metrics_get_dns_end")]
    #[doc(alias = "get_dns_end")]
    pub fn dns_end(&mut self) -> u64 {
        unsafe { ffi::soup_message_metrics_get_dns_end(self.to_glib_none_mut().0) }
    }

    #[doc(alias = "soup_message_metrics_get_dns_start")]
    #[doc(alias = "get_dns_start")]
    pub fn dns_start(&mut self) -> u64 {
        unsafe { ffi::soup_message_metrics_get_dns_start(self.to_glib_none_mut().0) }
    }

    #[doc(alias = "soup_message_metrics_get_fetch_start")]
    #[doc(alias = "get_fetch_start")]
    pub fn fetch_start(&mut self) -> u64 {
        unsafe { ffi::soup_message_metrics_get_fetch_start(self.to_glib_none_mut().0) }
    }

    #[doc(alias = "soup_message_metrics_get_request_body_bytes_sent")]
    #[doc(alias = "get_request_body_bytes_sent")]
    pub fn request_body_bytes_sent(&mut self) -> u64 {
        unsafe { ffi::soup_message_metrics_get_request_body_bytes_sent(self.to_glib_none_mut().0) }
    }

    #[doc(alias = "soup_message_metrics_get_request_body_size")]
    #[doc(alias = "get_request_body_size")]
    pub fn request_body_size(&mut self) -> u64 {
        unsafe { ffi::soup_message_metrics_get_request_body_size(self.to_glib_none_mut().0) }
    }

    #[doc(alias = "soup_message_metrics_get_request_header_bytes_sent")]
    #[doc(alias = "get_request_header_bytes_sent")]
    pub fn request_header_bytes_sent(&mut self) -> u64 {
        unsafe {
            ffi::soup_message_metrics_get_request_header_bytes_sent(self.to_glib_none_mut().0)
        }
    }

    #[doc(alias = "soup_message_metrics_get_request_start")]
    #[doc(alias = "get_request_start")]
    pub fn request_start(&mut self) -> u64 {
        unsafe { ffi::soup_message_metrics_get_request_start(self.to_glib_none_mut().0) }
    }

    #[doc(alias = "soup_message_metrics_get_response_body_bytes_received")]
    #[doc(alias = "get_response_body_bytes_received")]
    pub fn response_body_bytes_received(&mut self) -> u64 {
        unsafe {
            ffi::soup_message_metrics_get_response_body_bytes_received(self.to_glib_none_mut().0)
        }
    }

    #[doc(alias = "soup_message_metrics_get_response_body_size")]
    #[doc(alias = "get_response_body_size")]
    pub fn response_body_size(&mut self) -> u64 {
        unsafe { ffi::soup_message_metrics_get_response_body_size(self.to_glib_none_mut().0) }
    }

    #[doc(alias = "soup_message_metrics_get_response_end")]
    #[doc(alias = "get_response_end")]
    pub fn response_end(&mut self) -> u64 {
        unsafe { ffi::soup_message_metrics_get_response_end(self.to_glib_none_mut().0) }
    }

    #[doc(alias = "soup_message_metrics_get_response_header_bytes_received")]
    #[doc(alias = "get_response_header_bytes_received")]
    pub fn response_header_bytes_received(&mut self) -> u64 {
        unsafe {
            ffi::soup_message_metrics_get_response_header_bytes_received(self.to_glib_none_mut().0)
        }
    }

    #[doc(alias = "soup_message_metrics_get_response_start")]
    #[doc(alias = "get_response_start")]
    pub fn response_start(&mut self) -> u64 {
        unsafe { ffi::soup_message_metrics_get_response_start(self.to_glib_none_mut().0) }
    }

    #[doc(alias = "soup_message_metrics_get_tls_start")]
    #[doc(alias = "get_tls_start")]
    pub fn tls_start(&mut self) -> u64 {
        unsafe { ffi::soup_message_metrics_get_tls_start(self.to_glib_none_mut().0) }
    }
}
