// GENERATED — DO NOT EDIT

///|
/// [Upstream documentation](https://docs.gtk.org/gio/class.DBusMessage.html).
pub type DBusMessage

///|
pub(open) trait IDBusMessage {
  fn as_dbus_message(Self) -> DBusMessage
  fn copy(Self) -> DBusMessage raise @glib.Error_ = _
  fn get_arg0(Self) -> String? = _
  fn get_arg0_path(Self) -> String? = _
  fn get_body(Self) -> @glib.Variant? = _
  fn get_byte_order(Self) -> DBusMessageByteOrder = _
  fn get_destination(Self) -> String? = _
  fn get_error_name(Self) -> String? = _
  fn get_flags(Self) -> DBusMessageFlags = _
  fn get_header(Self, DBusMessageHeaderField) -> @glib.Variant? = _
  fn get_interface(Self) -> String? = _
  fn get_locked(Self) -> Bool = _
  fn get_member(Self) -> String? = _
  fn get_message_type(Self) -> DBusMessageType = _
  fn get_num_unix_fds(Self) -> UInt = _
  fn get_path(Self) -> String? = _
  fn get_reply_serial(Self) -> UInt = _
  fn get_sender(Self) -> String? = _
  fn get_serial(Self) -> UInt = _
  fn get_signature(Self) -> String = _
  fn get_unix_fd_list(Self) -> UnixFDList? = _
  fn lock(Self) -> Unit = _
  fn new_method_error_literal(Self, String, String) -> DBusMessage = _
  fn new_method_reply(Self) -> DBusMessage = _
  fn print(Self, UInt) -> String = _
  fn set_body(Self, &@glib.IVariant) -> Unit = _
  fn set_byte_order(Self, DBusMessageByteOrder) -> Unit = _
  fn set_destination(Self, String?) -> Unit = _
  fn set_error_name(Self, String) -> Unit = _
  fn set_flags(Self, DBusMessageFlags) -> Unit = _
  fn set_header(Self, DBusMessageHeaderField, &@glib.IVariant?) -> Unit = _
  fn set_interface(Self, String?) -> Unit = _
  fn set_member(Self, String?) -> Unit = _
  fn set_message_type(Self, DBusMessageType) -> Unit = _
  fn set_num_unix_fds(Self, UInt) -> Unit = _
  fn set_path(Self, String?) -> Unit = _
  fn set_reply_serial(Self, UInt) -> Unit = _
  fn set_sender(Self, String?) -> Unit = _
  fn set_serial(Self, UInt) -> Unit = _
  fn set_signature(Self, String?) -> Unit = _
  fn set_unix_fd_list(Self, &IUnixFDList?) -> Unit = _
  fn to_gerror(Self) -> Bool raise @glib.Error_ = _
}

///|
pub impl IDBusMessage for DBusMessage with fn as_dbus_message(self) {
  self
}

///|
/// [Upstream documentation](https://docs.gtk.org/gio/ctor.DBusMessage.new.html).
pub extern "c" fn DBusMessage::new() -> DBusMessage = "moonbit_g_dbus_message_new"

///|
#borrow(name, path, interface_, method_)
extern "c" fn moonbit_g_dbus_message_new_method_call(
  name : @glib.Nullable[Bytes],
  path : Bytes,
  interface_ : @glib.Nullable[Bytes],
  method_ : Bytes,
) -> DBusMessage = "moonbit_g_dbus_message_new_method_call"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/ctor.DBusMessage.new_method_call.html).
pub fn DBusMessage::new_method_call(
  name : String?,
  path : String,
  interface_ : String?,
  method_ : String,
) -> DBusMessage {
  moonbit_g_dbus_message_new_method_call(
    match name {
      Some(s) => @glib.Nullable::some(@encoding/utf8.encode(s))
      None => @glib.Nullable::null()
    },
    @encoding/utf8.encode(path),
    match interface_ {
      Some(s) => @glib.Nullable::some(@encoding/utf8.encode(s))
      None => @glib.Nullable::null()
    },
    @encoding/utf8.encode(method_),
  )
}

///|
#borrow(path, interface_, signal)
extern "c" fn moonbit_g_dbus_message_new_signal(
  path : Bytes,
  interface_ : Bytes,
  signal : Bytes,
) -> DBusMessage = "moonbit_g_dbus_message_new_signal"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/ctor.DBusMessage.new_signal.html).
pub fn DBusMessage::new_signal(
  path : String,
  interface_ : String,
  signal : String,
) -> DBusMessage {
  moonbit_g_dbus_message_new_signal(
    @encoding/utf8.encode(path),
    @encoding/utf8.encode(interface_),
    @encoding/utf8.encode(signal),
  )
}

///|
#borrow(self_, error)
extern "c" fn moonbit_g_dbus_message_copy(
  self_ : DBusMessage,
  error : Ref[@glib.Nullable[@glib.Error_]],
) -> DBusMessage = "moonbit_g_dbus_message_copy"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.copy.html).
pub fn DBusMessage::copy(self : DBusMessage) -> DBusMessage raise @glib.Error_ {
  let error_ : Ref[@glib.Nullable[@glib.Error_]] = Ref(@glib.Nullable::null())
  let result = moonbit_g_dbus_message_copy(self, error_)
  match error_.val.to_option() {
    Some(e) => raise e
    None => ()
  }
  result
}

///|
#borrow(self_)
extern "c" fn moonbit_g_dbus_message_get_arg0(
  self_ : DBusMessage,
) -> @glib.Nullable[Bytes] = "moonbit_g_dbus_message_get_arg0"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.get_arg0.html).
pub fn DBusMessage::get_arg0(self : DBusMessage) -> String? {
  let result = moonbit_g_dbus_message_get_arg0(self)
  match result.to_option() {
    Some(bytes) => Some(@encoding/utf8.decode_lossy(bytes))
    None => None
  }
}

///|
#borrow(self_)
extern "c" fn moonbit_g_dbus_message_get_arg0_path(
  self_ : DBusMessage,
) -> @glib.Nullable[Bytes] = "moonbit_g_dbus_message_get_arg0_path"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.get_arg0_path.html).
pub fn DBusMessage::get_arg0_path(self : DBusMessage) -> String? {
  let result = moonbit_g_dbus_message_get_arg0_path(self)
  match result.to_option() {
    Some(bytes) => Some(@encoding/utf8.decode_lossy(bytes))
    None => None
  }
}

///|
#borrow(self_)
extern "c" fn moonbit_g_dbus_message_get_body(
  self_ : DBusMessage,
) -> @glib.Nullable[@glib.Variant] = "moonbit_g_dbus_message_get_body"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.get_body.html).
pub fn DBusMessage::get_body(self : DBusMessage) -> @glib.Variant? {
  let raw_result = moonbit_g_dbus_message_get_body(self)
  raw_result.to_option()
}

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.get_byte_order.html).
#borrow(self)
pub extern "c" fn DBusMessage::get_byte_order(
  self : DBusMessage,
) -> DBusMessageByteOrder = "moonbit_g_dbus_message_get_byte_order"

///|
#borrow(self_)
extern "c" fn moonbit_g_dbus_message_get_destination(
  self_ : DBusMessage,
) -> @glib.Nullable[Bytes] = "moonbit_g_dbus_message_get_destination"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.get_destination.html).
pub fn DBusMessage::get_destination(self : DBusMessage) -> String? {
  let result = moonbit_g_dbus_message_get_destination(self)
  match result.to_option() {
    Some(bytes) => Some(@encoding/utf8.decode_lossy(bytes))
    None => None
  }
}

///|
#borrow(self_)
extern "c" fn moonbit_g_dbus_message_get_error_name(
  self_ : DBusMessage,
) -> @glib.Nullable[Bytes] = "moonbit_g_dbus_message_get_error_name"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.get_error_name.html).
pub fn DBusMessage::get_error_name(self : DBusMessage) -> String? {
  let result = moonbit_g_dbus_message_get_error_name(self)
  match result.to_option() {
    Some(bytes) => Some(@encoding/utf8.decode_lossy(bytes))
    None => None
  }
}

///|
#borrow(self_)
extern "c" fn moonbit_g_dbus_message_get_flags(self_ : DBusMessage) -> Int = "moonbit_g_dbus_message_get_flags"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.get_flags.html).
pub fn DBusMessage::get_flags(self : DBusMessage) -> DBusMessageFlags {
  DBusMessageFlags::from_int(moonbit_g_dbus_message_get_flags(self))
}

///|
#borrow(self_)
extern "c" fn moonbit_g_dbus_message_get_header(
  self_ : DBusMessage,
  header_field : DBusMessageHeaderField,
) -> @glib.Nullable[@glib.Variant] = "moonbit_g_dbus_message_get_header"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.get_header.html).
pub fn DBusMessage::get_header(
  self : DBusMessage,
  header_field : DBusMessageHeaderField,
) -> @glib.Variant? {
  let raw_result = moonbit_g_dbus_message_get_header(self, header_field)
  raw_result.to_option()
}

///|
#borrow(self_)
extern "c" fn moonbit_g_dbus_message_get_interface(
  self_ : DBusMessage,
) -> @glib.Nullable[Bytes] = "moonbit_g_dbus_message_get_interface"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.get_interface.html).
pub fn DBusMessage::get_interface(self : DBusMessage) -> String? {
  let result = moonbit_g_dbus_message_get_interface(self)
  match result.to_option() {
    Some(bytes) => Some(@encoding/utf8.decode_lossy(bytes))
    None => None
  }
}

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.get_locked.html).
#borrow(self)
pub extern "c" fn DBusMessage::get_locked(self : DBusMessage) -> Bool = "moonbit_g_dbus_message_get_locked"

///|
#borrow(self_)
extern "c" fn moonbit_g_dbus_message_get_member(
  self_ : DBusMessage,
) -> @glib.Nullable[Bytes] = "moonbit_g_dbus_message_get_member"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.get_member.html).
pub fn DBusMessage::get_member(self : DBusMessage) -> String? {
  let result = moonbit_g_dbus_message_get_member(self)
  match result.to_option() {
    Some(bytes) => Some(@encoding/utf8.decode_lossy(bytes))
    None => None
  }
}

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.get_message_type.html).
#borrow(self)
pub extern "c" fn DBusMessage::get_message_type(
  self : DBusMessage,
) -> DBusMessageType = "moonbit_g_dbus_message_get_message_type"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.get_num_unix_fds.html).
#borrow(self)
pub extern "c" fn DBusMessage::get_num_unix_fds(self : DBusMessage) -> UInt = "moonbit_g_dbus_message_get_num_unix_fds"

///|
#borrow(self_)
extern "c" fn moonbit_g_dbus_message_get_path(
  self_ : DBusMessage,
) -> @glib.Nullable[Bytes] = "moonbit_g_dbus_message_get_path"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.get_path.html).
pub fn DBusMessage::get_path(self : DBusMessage) -> String? {
  let result = moonbit_g_dbus_message_get_path(self)
  match result.to_option() {
    Some(bytes) => Some(@encoding/utf8.decode_lossy(bytes))
    None => None
  }
}

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.get_reply_serial.html).
#borrow(self)
pub extern "c" fn DBusMessage::get_reply_serial(self : DBusMessage) -> UInt = "moonbit_g_dbus_message_get_reply_serial"

///|
#borrow(self_)
extern "c" fn moonbit_g_dbus_message_get_sender(
  self_ : DBusMessage,
) -> @glib.Nullable[Bytes] = "moonbit_g_dbus_message_get_sender"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.get_sender.html).
pub fn DBusMessage::get_sender(self : DBusMessage) -> String? {
  let result = moonbit_g_dbus_message_get_sender(self)
  match result.to_option() {
    Some(bytes) => Some(@encoding/utf8.decode_lossy(bytes))
    None => None
  }
}

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.get_serial.html).
#borrow(self)
pub extern "c" fn DBusMessage::get_serial(self : DBusMessage) -> UInt = "moonbit_g_dbus_message_get_serial"

///|
#borrow(self_)
extern "c" fn moonbit_g_dbus_message_get_signature(
  self_ : DBusMessage,
) -> Bytes = "moonbit_g_dbus_message_get_signature"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.get_signature.html).
pub fn DBusMessage::get_signature(self : DBusMessage) -> String {
  @encoding/utf8.decode_lossy(moonbit_g_dbus_message_get_signature(self))
}

///|
#borrow(self_)
extern "c" fn moonbit_g_dbus_message_get_unix_fd_list(
  self_ : DBusMessage,
) -> @glib.Nullable[UnixFDList] = "moonbit_g_dbus_message_get_unix_fd_list"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.get_unix_fd_list.html).
pub fn DBusMessage::get_unix_fd_list(self : DBusMessage) -> UnixFDList? {
  let raw_result = moonbit_g_dbus_message_get_unix_fd_list(self)
  raw_result.to_option()
}

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.lock.html).
#borrow(self)
pub extern "c" fn DBusMessage::lock(self : DBusMessage) = "moonbit_g_dbus_message_lock"

///|
#borrow(self_, error_name, error_message)
extern "c" fn moonbit_g_dbus_message_new_method_error_literal(
  self_ : DBusMessage,
  error_name : Bytes,
  error_message : Bytes,
) -> DBusMessage = "moonbit_g_dbus_message_new_method_error_literal"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.new_method_error_literal.html).
pub fn DBusMessage::new_method_error_literal(
  self : DBusMessage,
  error_name : String,
  error_message : String,
) -> DBusMessage {
  moonbit_g_dbus_message_new_method_error_literal(
    self,
    @encoding/utf8.encode(error_name),
    @encoding/utf8.encode(error_message),
  )
}

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.new_method_reply.html).
#borrow(self)
pub extern "c" fn DBusMessage::new_method_reply(
  self : DBusMessage,
) -> DBusMessage = "moonbit_g_dbus_message_new_method_reply"

///|
#borrow(self_)
extern "c" fn moonbit_g_dbus_message_print(
  self_ : DBusMessage,
  indent : UInt,
) -> Bytes = "moonbit_g_dbus_message_print"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.print.html).
pub fn DBusMessage::print(self : DBusMessage, indent : UInt) -> String {
  @encoding/utf8.decode_lossy(moonbit_g_dbus_message_print(self, indent))
}

///|
#borrow(self_, body)
extern "c" fn moonbit_g_dbus_message_set_body(
  self_ : DBusMessage,
  body : @glib.Variant,
) = "moonbit_g_dbus_message_set_body"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.set_body.html).
pub fn DBusMessage::set_body(
  self : DBusMessage,
  body : &@glib.IVariant,
) -> Unit {
  moonbit_g_dbus_message_set_body(self, body.as_variant())
}

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.set_byte_order.html).
#borrow(self)
pub extern "c" fn DBusMessage::set_byte_order(
  self : DBusMessage,
  byte_order : DBusMessageByteOrder,
) = "moonbit_g_dbus_message_set_byte_order"

///|
#borrow(self_, value)
extern "c" fn moonbit_g_dbus_message_set_destination(
  self_ : DBusMessage,
  value : @glib.Nullable[Bytes],
) = "moonbit_g_dbus_message_set_destination"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.set_destination.html).
pub fn DBusMessage::set_destination(
  self : DBusMessage,
  value : String?,
) -> Unit {
  moonbit_g_dbus_message_set_destination(
    self,
    match value {
      Some(s) => @glib.Nullable::some(@encoding/utf8.encode(s))
      None => @glib.Nullable::null()
    },
  )
}

///|
#borrow(self_, value)
extern "c" fn moonbit_g_dbus_message_set_error_name(
  self_ : DBusMessage,
  value : Bytes,
) = "moonbit_g_dbus_message_set_error_name"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.set_error_name.html).
pub fn DBusMessage::set_error_name(self : DBusMessage, value : String) -> Unit {
  moonbit_g_dbus_message_set_error_name(self, @encoding/utf8.encode(value))
}

///|
#borrow(self_)
extern "c" fn moonbit_g_dbus_message_set_flags(
  self_ : DBusMessage,
  flags : Int,
) = "moonbit_g_dbus_message_set_flags"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.set_flags.html).
pub fn DBusMessage::set_flags(
  self : DBusMessage,
  flags : DBusMessageFlags,
) -> Unit {
  moonbit_g_dbus_message_set_flags(self, flags.to_int())
}

///|
#borrow(self_, value)
extern "c" fn moonbit_g_dbus_message_set_header(
  self_ : DBusMessage,
  header_field : DBusMessageHeaderField,
  value : @glib.Nullable[@glib.Variant],
) = "moonbit_g_dbus_message_set_header"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.set_header.html).
pub fn DBusMessage::set_header(
  self : DBusMessage,
  header_field : DBusMessageHeaderField,
  value : &@glib.IVariant?,
) -> Unit {
  moonbit_g_dbus_message_set_header(
    self,
    header_field,
    match value {
      Some(v) => @glib.Nullable::some(v.as_variant())
      None => @glib.Nullable::null()
    },
  )
}

///|
#borrow(self_, value)
extern "c" fn moonbit_g_dbus_message_set_interface(
  self_ : DBusMessage,
  value : @glib.Nullable[Bytes],
) = "moonbit_g_dbus_message_set_interface"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.set_interface.html).
pub fn DBusMessage::set_interface(self : DBusMessage, value : String?) -> Unit {
  moonbit_g_dbus_message_set_interface(
    self,
    match value {
      Some(s) => @glib.Nullable::some(@encoding/utf8.encode(s))
      None => @glib.Nullable::null()
    },
  )
}

///|
#borrow(self_, value)
extern "c" fn moonbit_g_dbus_message_set_member(
  self_ : DBusMessage,
  value : @glib.Nullable[Bytes],
) = "moonbit_g_dbus_message_set_member"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.set_member.html).
pub fn DBusMessage::set_member(self : DBusMessage, value : String?) -> Unit {
  moonbit_g_dbus_message_set_member(
    self,
    match value {
      Some(s) => @glib.Nullable::some(@encoding/utf8.encode(s))
      None => @glib.Nullable::null()
    },
  )
}

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.set_message_type.html).
#borrow(self)
pub extern "c" fn DBusMessage::set_message_type(
  self : DBusMessage,
  type_ : DBusMessageType,
) = "moonbit_g_dbus_message_set_message_type"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.set_num_unix_fds.html).
#borrow(self)
pub extern "c" fn DBusMessage::set_num_unix_fds(
  self : DBusMessage,
  value : UInt,
) = "moonbit_g_dbus_message_set_num_unix_fds"

///|
#borrow(self_, value)
extern "c" fn moonbit_g_dbus_message_set_path(
  self_ : DBusMessage,
  value : @glib.Nullable[Bytes],
) = "moonbit_g_dbus_message_set_path"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.set_path.html).
pub fn DBusMessage::set_path(self : DBusMessage, value : String?) -> Unit {
  moonbit_g_dbus_message_set_path(
    self,
    match value {
      Some(s) => @glib.Nullable::some(@encoding/utf8.encode(s))
      None => @glib.Nullable::null()
    },
  )
}

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.set_reply_serial.html).
#borrow(self)
pub extern "c" fn DBusMessage::set_reply_serial(
  self : DBusMessage,
  value : UInt,
) = "moonbit_g_dbus_message_set_reply_serial"

///|
#borrow(self_, value)
extern "c" fn moonbit_g_dbus_message_set_sender(
  self_ : DBusMessage,
  value : @glib.Nullable[Bytes],
) = "moonbit_g_dbus_message_set_sender"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.set_sender.html).
pub fn DBusMessage::set_sender(self : DBusMessage, value : String?) -> Unit {
  moonbit_g_dbus_message_set_sender(
    self,
    match value {
      Some(s) => @glib.Nullable::some(@encoding/utf8.encode(s))
      None => @glib.Nullable::null()
    },
  )
}

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.set_serial.html).
#borrow(self)
pub extern "c" fn DBusMessage::set_serial(self : DBusMessage, serial : UInt) = "moonbit_g_dbus_message_set_serial"

///|
#borrow(self_, value)
extern "c" fn moonbit_g_dbus_message_set_signature(
  self_ : DBusMessage,
  value : @glib.Nullable[Bytes],
) = "moonbit_g_dbus_message_set_signature"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.set_signature.html).
pub fn DBusMessage::set_signature(self : DBusMessage, value : String?) -> Unit {
  moonbit_g_dbus_message_set_signature(
    self,
    match value {
      Some(s) => @glib.Nullable::some(@encoding/utf8.encode(s))
      None => @glib.Nullable::null()
    },
  )
}

///|
#borrow(self_, fd_list)
extern "c" fn moonbit_g_dbus_message_set_unix_fd_list(
  self_ : DBusMessage,
  fd_list : @glib.Nullable[UnixFDList],
) = "moonbit_g_dbus_message_set_unix_fd_list"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.set_unix_fd_list.html).
pub fn DBusMessage::set_unix_fd_list(
  self : DBusMessage,
  fd_list : &IUnixFDList?,
) -> Unit {
  moonbit_g_dbus_message_set_unix_fd_list(
    self,
    match fd_list {
      Some(v) => @glib.Nullable::some(v.as_unix_fd_list())
      None => @glib.Nullable::null()
    },
  )
}

///|
#borrow(self_, error)
extern "c" fn moonbit_g_dbus_message_to_gerror(
  self_ : DBusMessage,
  error : Ref[@glib.Nullable[@glib.Error_]],
) -> Bool = "moonbit_g_dbus_message_to_gerror"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.DBusMessage.to_gerror.html).
pub fn DBusMessage::to_gerror(self : DBusMessage) -> Bool raise @glib.Error_ {
  let error_ : Ref[@glib.Nullable[@glib.Error_]] = Ref(@glib.Nullable::null())
  let result = moonbit_g_dbus_message_to_gerror(self, error_)
  match error_.val.to_option() {
    Some(e) => raise e
    None => ()
  }
  result
}

///|
impl IDBusMessage with fn copy(self) -> DBusMessage raise @glib.Error_ {
  self.as_dbus_message().copy()
}

///|
impl IDBusMessage with fn get_arg0(self) -> String? {
  self.as_dbus_message().get_arg0()
}

///|
impl IDBusMessage with fn get_arg0_path(self) -> String? {
  self.as_dbus_message().get_arg0_path()
}

///|
impl IDBusMessage with fn get_body(self) -> @glib.Variant? {
  self.as_dbus_message().get_body()
}

///|
impl IDBusMessage with fn get_byte_order(self) -> DBusMessageByteOrder {
  self.as_dbus_message().get_byte_order()
}

///|
impl IDBusMessage with fn get_destination(self) -> String? {
  self.as_dbus_message().get_destination()
}

///|
impl IDBusMessage with fn get_error_name(self) -> String? {
  self.as_dbus_message().get_error_name()
}

///|
impl IDBusMessage with fn get_flags(self) -> DBusMessageFlags {
  self.as_dbus_message().get_flags()
}

///|
impl IDBusMessage with fn get_header(self, header_field) -> @glib.Variant? {
  self.as_dbus_message().get_header(header_field)
}

///|
impl IDBusMessage with fn get_interface(self) -> String? {
  self.as_dbus_message().get_interface()
}

///|
impl IDBusMessage with fn get_locked(self) -> Bool {
  self.as_dbus_message().get_locked()
}

///|
impl IDBusMessage with fn get_member(self) -> String? {
  self.as_dbus_message().get_member()
}

///|
impl IDBusMessage with fn get_message_type(self) -> DBusMessageType {
  self.as_dbus_message().get_message_type()
}

///|
impl IDBusMessage with fn get_num_unix_fds(self) -> UInt {
  self.as_dbus_message().get_num_unix_fds()
}

///|
impl IDBusMessage with fn get_path(self) -> String? {
  self.as_dbus_message().get_path()
}

///|
impl IDBusMessage with fn get_reply_serial(self) -> UInt {
  self.as_dbus_message().get_reply_serial()
}

///|
impl IDBusMessage with fn get_sender(self) -> String? {
  self.as_dbus_message().get_sender()
}

///|
impl IDBusMessage with fn get_serial(self) -> UInt {
  self.as_dbus_message().get_serial()
}

///|
impl IDBusMessage with fn get_signature(self) -> String {
  self.as_dbus_message().get_signature()
}

///|
impl IDBusMessage with fn get_unix_fd_list(self) -> UnixFDList? {
  self.as_dbus_message().get_unix_fd_list()
}

///|
impl IDBusMessage with fn lock(self) -> Unit {
  self.as_dbus_message().lock()
}

///|
impl IDBusMessage with fn new_method_error_literal(
  self,
  error_name,
  error_message,
) -> DBusMessage {
  self.as_dbus_message().new_method_error_literal(error_name, error_message)
}

///|
impl IDBusMessage with fn new_method_reply(self) -> DBusMessage {
  self.as_dbus_message().new_method_reply()
}

///|
impl IDBusMessage with fn print(self, indent) -> String {
  self.as_dbus_message().print(indent)
}

///|
impl IDBusMessage with fn set_body(self, body) -> Unit {
  self.as_dbus_message().set_body(body)
}

///|
impl IDBusMessage with fn set_byte_order(self, byte_order) -> Unit {
  self.as_dbus_message().set_byte_order(byte_order)
}

///|
impl IDBusMessage with fn set_destination(self, value) -> Unit {
  self.as_dbus_message().set_destination(value)
}

///|
impl IDBusMessage with fn set_error_name(self, value) -> Unit {
  self.as_dbus_message().set_error_name(value)
}

///|
impl IDBusMessage with fn set_flags(self, flags) -> Unit {
  self.as_dbus_message().set_flags(flags)
}

///|
impl IDBusMessage with fn set_header(self, header_field, value) -> Unit {
  self.as_dbus_message().set_header(header_field, value)
}

///|
impl IDBusMessage with fn set_interface(self, value) -> Unit {
  self.as_dbus_message().set_interface(value)
}

///|
impl IDBusMessage with fn set_member(self, value) -> Unit {
  self.as_dbus_message().set_member(value)
}

///|
impl IDBusMessage with fn set_message_type(self, type_) -> Unit {
  self.as_dbus_message().set_message_type(type_)
}

///|
impl IDBusMessage with fn set_num_unix_fds(self, value) -> Unit {
  self.as_dbus_message().set_num_unix_fds(value)
}

///|
impl IDBusMessage with fn set_path(self, value) -> Unit {
  self.as_dbus_message().set_path(value)
}

///|
impl IDBusMessage with fn set_reply_serial(self, value) -> Unit {
  self.as_dbus_message().set_reply_serial(value)
}

///|
impl IDBusMessage with fn set_sender(self, value) -> Unit {
  self.as_dbus_message().set_sender(value)
}

///|
impl IDBusMessage with fn set_serial(self, serial) -> Unit {
  self.as_dbus_message().set_serial(serial)
}

///|
impl IDBusMessage with fn set_signature(self, value) -> Unit {
  self.as_dbus_message().set_signature(value)
}

///|
impl IDBusMessage with fn set_unix_fd_list(self, fd_list) -> Unit {
  self.as_dbus_message().set_unix_fd_list(fd_list)
}

///|
impl IDBusMessage with fn to_gerror(self) -> Bool raise @glib.Error_ {
  self.as_dbus_message().to_gerror()
}

///|
pub fn DBusMessage::as_gobject_object(self : DBusMessage) -> @gobject.Object = "%identity"

///|
pub impl @gobject.IObject for DBusMessage with fn as_object(self) {
  self.as_gobject_object()
}