// DO NOT EDIT! This is an autogenerated file. All changes will be
// overwritten!

//	Copyright (c) 2023 Vidyo, Inc. All rights reserved.


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

namespace VidyoClient
{
	public class ConnectorProductInformationFactory
	{
		public static ConnectorProductInformation Create()
		{
			return new ConnectorProductInformation(IntPtr.Zero);
		}
		public static void Destroy(ConnectorProductInformation obj)
		{
		}
	}
	/// <summary>
	/// Describes the information about the product.
	/// </summary>
	public class ConnectorProductInformation {
#if __IOS__
		const string importLib = "__Internal";
#else
		const string importLib = "libVidyoClient";
#endif
		private IntPtr objPtr; // opaque VidyoConnectorProductInformation reference.
		public IntPtr GetObjectPtr() {
			IntPtr nValue = MarshalPtrToUtf8.GetInstance().MarshalManagedToNative(value ?? string.Empty);

			VidyoConnectorProductInformationSetpropertyNameNative(objPtr, propertyName);
			VidyoConnectorProductInformationSetvalueNative(objPtr, nValue);

			Marshal.FreeHGlobal(nValue);
			return objPtr;
		}
		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		[return: MarshalAs(UnmanagedType.I4)]
		private static extern Connector.ConnectorProperty VidyoConnectorProductInformationGetpropertyNameNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern void VidyoConnectorProductInformationSetpropertyNameNative(IntPtr obj, Connector.ConnectorProperty propertyName);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern IntPtr VidyoConnectorProductInformationGetvalueNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern void VidyoConnectorProductInformationSetvalueNative(IntPtr obj, IntPtr value);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr VidyoConnectorProductInformationConstructCopyNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		public static extern IntPtr VidyoConnectorProductInformationConstructDefaultNative();

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		public static extern void VidyoConnectorProductInformationDestructNative(IntPtr obj);

		/// <summary>
		/// Describes the property name. Refer VidyoConnectorProperty.
		/// </summary>
		public Connector.ConnectorProperty propertyName;
		/// <summary>
		/// This represents the value of the property.
		/// </summary>
		public String value;
		public ConnectorProductInformation(IntPtr obj){
			if(obj == IntPtr.Zero) {
				objPtr = VidyoConnectorProductInformationConstructDefaultNative();
			}
			else {
				objPtr = VidyoConnectorProductInformationConstructCopyNative(obj);
			}

			propertyName = VidyoConnectorProductInformationGetpropertyNameNative(objPtr);
			value = (string)MarshalPtrToUtf8.GetInstance().MarshalNativeToManaged(VidyoConnectorProductInformationGetvalueNative(objPtr));
		}
		~ConnectorProductInformation() {
			VidyoConnectorProductInformationDestructNative(objPtr);
		 }
	};
}
