// GENERATED — DO NOT EDIT

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

///|
pub(open) trait INotification {
  fn as_notification(Self) -> Notification
  fn add_button(Self, String, String) -> Unit = _
  fn add_button_with_target_value(Self, String, String, &@glib.IVariant?) -> Unit = _
  fn set_body(Self, String?) -> Unit = _
  fn set_category(Self, String?) -> Unit = _
  fn set_default_action(Self, String) -> Unit = _
  fn set_default_action_and_target_value(Self, String, &@glib.IVariant?) -> Unit = _
  fn set_icon(Self, &IIcon) -> Unit = _
  fn set_priority(Self, NotificationPriority) -> Unit = _
  fn set_title(Self, String) -> Unit = _
}

///|
pub impl INotification for Notification with fn as_notification(self) {
  self
}

///|
#borrow(title)
extern "c" fn moonbit_g_notification_new(title : Bytes) -> Notification = "moonbit_g_notification_new"

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

///|
#borrow(self_, label, detailed_action)
extern "c" fn moonbit_g_notification_add_button(
  self_ : Notification,
  label : Bytes,
  detailed_action : Bytes,
) = "moonbit_g_notification_add_button"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.Notification.add_button.html).
pub fn Notification::add_button(
  self : Notification,
  label : String,
  detailed_action : String,
) -> Unit {
  moonbit_g_notification_add_button(
    self,
    @encoding/utf8.encode(label),
    @encoding/utf8.encode(detailed_action),
  )
}

///|
#borrow(self_, label, action, target)
extern "c" fn moonbit_g_notification_add_button_with_target_value(
  self_ : Notification,
  label : Bytes,
  action : Bytes,
  target : @glib.Nullable[@glib.Variant],
) = "moonbit_g_notification_add_button_with_target_value"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.Notification.add_button_with_target_value.html).
pub fn Notification::add_button_with_target_value(
  self : Notification,
  label : String,
  action : String,
  target : &@glib.IVariant?,
) -> Unit {
  moonbit_g_notification_add_button_with_target_value(
    self,
    @encoding/utf8.encode(label),
    @encoding/utf8.encode(action),
    match target {
      Some(v) => @glib.Nullable::some(v.as_variant())
      None => @glib.Nullable::null()
    },
  )
}

///|
#borrow(self_, body)
extern "c" fn moonbit_g_notification_set_body(
  self_ : Notification,
  body : @glib.Nullable[Bytes],
) = "moonbit_g_notification_set_body"

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

///|
#borrow(self_, category)
extern "c" fn moonbit_g_notification_set_category(
  self_ : Notification,
  category : @glib.Nullable[Bytes],
) = "moonbit_g_notification_set_category"

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

///|
#borrow(self_, detailed_action)
extern "c" fn moonbit_g_notification_set_default_action(
  self_ : Notification,
  detailed_action : Bytes,
) = "moonbit_g_notification_set_default_action"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.Notification.set_default_action.html).
pub fn Notification::set_default_action(
  self : Notification,
  detailed_action : String,
) -> Unit {
  moonbit_g_notification_set_default_action(
    self,
    @encoding/utf8.encode(detailed_action),
  )
}

///|
#borrow(self_, action, target)
extern "c" fn moonbit_g_notification_set_default_action_and_target_value(
  self_ : Notification,
  action : Bytes,
  target : @glib.Nullable[@glib.Variant],
) = "moonbit_g_notification_set_default_action_and_target_value"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.Notification.set_default_action_and_target_value.html).
pub fn Notification::set_default_action_and_target_value(
  self : Notification,
  action : String,
  target : &@glib.IVariant?,
) -> Unit {
  moonbit_g_notification_set_default_action_and_target_value(
    self,
    @encoding/utf8.encode(action),
    match target {
      Some(v) => @glib.Nullable::some(v.as_variant())
      None => @glib.Nullable::null()
    },
  )
}

///|
#borrow(self_, icon)
extern "c" fn moonbit_g_notification_set_icon(
  self_ : Notification,
  icon : Icon,
) = "moonbit_g_notification_set_icon"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.Notification.set_icon.html).
pub fn Notification::set_icon(self : Notification, icon : &IIcon) -> Unit {
  moonbit_g_notification_set_icon(self, icon.as_icon())
}

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.Notification.set_priority.html).
#borrow(self)
pub extern "c" fn Notification::set_priority(
  self : Notification,
  priority : NotificationPriority,
) = "moonbit_g_notification_set_priority"

///|
#borrow(self_, title)
extern "c" fn moonbit_g_notification_set_title(
  self_ : Notification,
  title : Bytes,
) = "moonbit_g_notification_set_title"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.Notification.set_title.html).
pub fn Notification::set_title(self : Notification, title : String) -> Unit {
  moonbit_g_notification_set_title(self, @encoding/utf8.encode(title))
}

///|
impl INotification with fn add_button(self, label, detailed_action) -> Unit {
  self.as_notification().add_button(label, detailed_action)
}

///|
impl INotification with fn add_button_with_target_value(
  self,
  label,
  action,
  target,
) -> Unit {
  self.as_notification().add_button_with_target_value(label, action, target)
}

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

///|
impl INotification with fn set_category(self, category) -> Unit {
  self.as_notification().set_category(category)
}

///|
impl INotification with fn set_default_action(self, detailed_action) -> Unit {
  self.as_notification().set_default_action(detailed_action)
}

///|
impl INotification with fn set_default_action_and_target_value(
  self,
  action,
  target,
) -> Unit {
  self.as_notification().set_default_action_and_target_value(action, target)
}

///|
impl INotification with fn set_icon(self, icon) -> Unit {
  self.as_notification().set_icon(icon)
}

///|
impl INotification with fn set_priority(self, priority) -> Unit {
  self.as_notification().set_priority(priority)
}

///|
impl INotification with fn set_title(self, title) -> Unit {
  self.as_notification().set_title(title)
}

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

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