// GENERATED — DO NOT EDIT

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

///|
pub(open) trait IUnixSocketAddress {
  fn as_unix_socket_address(Self) -> UnixSocketAddress
  fn get_address_type(Self) -> UnixSocketAddressType = _
  fn get_path(Self) -> String = _
  fn get_path_len(Self) -> UInt64 = _
}

///|
pub impl IUnixSocketAddress for UnixSocketAddress with fn as_unix_socket_address(
  self,
) {
  self
}

///|
#borrow(path)
extern "c" fn moonbit_g_unix_socket_address_new(
  path : Bytes,
) -> UnixSocketAddress = "moonbit_g_unix_socket_address_new"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/ctor.UnixSocketAddress.new.html).
pub fn UnixSocketAddress::new(path : String) -> UnixSocketAddress {
  moonbit_g_unix_socket_address_new(@encoding/utf8.encode(path))
}

///|
/// [Upstream documentation](https://docs.gtk.org/gio/type_func.UnixSocketAddress.abstract_names_supported.html).
pub extern "c" fn UnixSocketAddress::abstract_names_supported() -> Bool = "moonbit_g_unix_socket_address_abstract_names_supported"

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

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

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

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

///|
impl IUnixSocketAddress with fn get_address_type(self) -> UnixSocketAddressType {
  self.as_unix_socket_address().get_address_type()
}

///|
impl IUnixSocketAddress with fn get_path(self) -> String {
  self.as_unix_socket_address().get_path()
}

///|
impl IUnixSocketAddress with fn get_path_len(self) -> UInt64 {
  self.as_unix_socket_address().get_path_len()
}

///|
pub fn UnixSocketAddress::as_socket_address(
  self : UnixSocketAddress,
) -> SocketAddress = "%identity"

///|
pub impl ISocketAddress for UnixSocketAddress with fn as_socket_address(self) {
  self.as_socket_address()
}

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

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

///|
pub fn UnixSocketAddress::as_socket_connectable(
  self : UnixSocketAddress,
) -> SocketConnectable = "%identity"

///|
pub impl ISocketConnectable for UnixSocketAddress with fn as_socket_connectable(
  self,
) {
  self.as_socket_connectable()
}