// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.

namespace WebKit {

	using System;
	using System.Collections;
	using System.Collections.Generic;
	using System.Runtime.InteropServices;

#region Autogenerated code
	[StructLayout(LayoutKind.Sequential)]
	public partial struct ITPFirstParty : IEquatable<ITPFirstParty> {


		public static WebKit.ITPFirstParty Zero = new WebKit.ITPFirstParty ();

		public static WebKit.ITPFirstParty New(IntPtr raw) {
			if (raw == IntPtr.Zero)
				return WebKit.ITPFirstParty.Zero;
			return (WebKit.ITPFirstParty) Marshal.PtrToStructure (raw, typeof (WebKit.ITPFirstParty));
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_webkit_itp_first_party_get_type();
		static d_webkit_itp_first_party_get_type webkit_itp_first_party_get_type = FuncLoader.LoadFunction<d_webkit_itp_first_party_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Webkit), "webkit_itp_first_party_get_type"));

		public static GLib.GType GType { 
			get {
				IntPtr raw_ret = webkit_itp_first_party_get_type();
				GLib.GType ret = new GLib.GType(raw_ret);
				return ret;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_webkit_itp_first_party_get_domain(IntPtr raw);
		static d_webkit_itp_first_party_get_domain webkit_itp_first_party_get_domain = FuncLoader.LoadFunction<d_webkit_itp_first_party_get_domain>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Webkit), "webkit_itp_first_party_get_domain"));

		public string Domain { 
			get {
				IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf<WebKit.ITPFirstParty>());
				System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
				IntPtr raw_ret = webkit_itp_first_party_get_domain(this_as_native);
				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
				ReadNative (this_as_native, ref this);
				System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
				return ret;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_webkit_itp_first_party_get_last_update_time(IntPtr raw);
		static d_webkit_itp_first_party_get_last_update_time webkit_itp_first_party_get_last_update_time = FuncLoader.LoadFunction<d_webkit_itp_first_party_get_last_update_time>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Webkit), "webkit_itp_first_party_get_last_update_time"));

		public GLib.DateTime LastUpdateTime { 
			get {
				IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf<WebKit.ITPFirstParty>());
				System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
				IntPtr raw_ret = webkit_itp_first_party_get_last_update_time(this_as_native);
				GLib.DateTime ret = new GLib.DateTime(raw_ret);
				ReadNative (this_as_native, ref this);
				System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
				return ret;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate bool d_webkit_itp_first_party_get_website_data_access_allowed(IntPtr raw);
		static d_webkit_itp_first_party_get_website_data_access_allowed webkit_itp_first_party_get_website_data_access_allowed = FuncLoader.LoadFunction<d_webkit_itp_first_party_get_website_data_access_allowed>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Webkit), "webkit_itp_first_party_get_website_data_access_allowed"));

		public bool WebsiteDataAccessAllowed { 
			get {
				IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf<WebKit.ITPFirstParty>());
				System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
				bool raw_ret = webkit_itp_first_party_get_website_data_access_allowed(this_as_native);
				bool ret = raw_ret;
				ReadNative (this_as_native, ref this);
				System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
				return ret;
			}
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_webkit_itp_first_party_ref(IntPtr raw);
		static d_webkit_itp_first_party_ref webkit_itp_first_party_ref = FuncLoader.LoadFunction<d_webkit_itp_first_party_ref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Webkit), "webkit_itp_first_party_ref"));

		public WebKit.ITPFirstParty Ref() {
			IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf<WebKit.ITPFirstParty>());
			System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
			IntPtr raw_ret = webkit_itp_first_party_ref(this_as_native);
			WebKit.ITPFirstParty ret = WebKit.ITPFirstParty.New (raw_ret);
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
			return ret;
		}

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate void d_webkit_itp_first_party_unref(IntPtr raw);
		static d_webkit_itp_first_party_unref webkit_itp_first_party_unref = FuncLoader.LoadFunction<d_webkit_itp_first_party_unref>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Webkit), "webkit_itp_first_party_unref"));

		public void Unref() {
			IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf<WebKit.ITPFirstParty>());
			System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
			webkit_itp_first_party_unref(this_as_native);
			ReadNative (this_as_native, ref this);
			System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
		}

		static void ReadNative (IntPtr native, ref WebKit.ITPFirstParty target)
		{
			target = New (native);
		}

		public bool Equals (ITPFirstParty other)
		{
			return true;
		}

		public override bool Equals (object other)
		{
			return other is ITPFirstParty && Equals ((ITPFirstParty) other);
		}

		public override int GetHashCode ()
		{
			return this.GetType ().FullName.GetHashCode ();
		}

		public static explicit operator GLib.Value (WebKit.ITPFirstParty boxed)
		{
			GLib.Value val = GLib.Value.Empty;
			val.Init (WebKit.ITPFirstParty.GType);
			val.Val = boxed;
			return val;
		}

		public static explicit operator WebKit.ITPFirstParty (GLib.Value val)
		{
			return (WebKit.ITPFirstParty) val.Val;
		}
#endregion
	}
}
