// 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 BandwidthSummaryStatsFactory
	{
		public static BandwidthSummaryStats Create()
		{
			return new BandwidthSummaryStats(IntPtr.Zero);
		}
		public static void Destroy(BandwidthSummaryStats obj)
		{
		}
	}
	/// <summary>
	/// Staticstics for an endpoint rate shaper.
	/// </summary>
	public class BandwidthSummaryStats {
#if __IOS__
		const string importLib = "__Internal";
#else
		const string importLib = "libVidyoClient";
#endif
		private IntPtr objPtr; // opaque VidyoBandwidthSummaryStats reference.
		public IntPtr GetObjectPtr() {

			VidyoBandwidthSummaryStatsSetactualEncoderBitRateNative(objPtr, actualEncoderBitRate);
			VidyoBandwidthSummaryStatsSetavailableBandwidthNative(objPtr, availableBandwidth);
			VidyoBandwidthSummaryStatsSetleakyBucketDelayNative(objPtr, leakyBucketDelay);
			VidyoBandwidthSummaryStatsSetretransmitBitRateNative(objPtr, retransmitBitRate);
			VidyoBandwidthSummaryStatsSettargetEncoderBitRateNative(objPtr, targetEncoderBitRate);
			VidyoBandwidthSummaryStatsSettotalTransmitBitRateNative(objPtr, totalTransmitBitRate);

			return objPtr;
		}
		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(SizeTMarshaler))]
		private static extern SizeT VidyoBandwidthSummaryStatsGetactualEncoderBitRateNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern void VidyoBandwidthSummaryStatsSetactualEncoderBitRateNative(IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(SizeTMarshaler))]SizeT actualEncoderBitRate);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(SizeTMarshaler))]
		private static extern SizeT VidyoBandwidthSummaryStatsGetavailableBandwidthNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern void VidyoBandwidthSummaryStatsSetavailableBandwidthNative(IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(SizeTMarshaler))]SizeT availableBandwidth);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(SizeTMarshaler))]
		private static extern SizeT VidyoBandwidthSummaryStatsGetleakyBucketDelayNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern void VidyoBandwidthSummaryStatsSetleakyBucketDelayNative(IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(SizeTMarshaler))]SizeT leakyBucketDelay);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(SizeTMarshaler))]
		private static extern SizeT VidyoBandwidthSummaryStatsGetretransmitBitRateNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern void VidyoBandwidthSummaryStatsSetretransmitBitRateNative(IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(SizeTMarshaler))]SizeT retransmitBitRate);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(SizeTMarshaler))]
		private static extern SizeT VidyoBandwidthSummaryStatsGettargetEncoderBitRateNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern void VidyoBandwidthSummaryStatsSettargetEncoderBitRateNative(IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(SizeTMarshaler))]SizeT targetEncoderBitRate);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(SizeTMarshaler))]
		private static extern SizeT VidyoBandwidthSummaryStatsGettotalTransmitBitRateNative(IntPtr obj);

		[DllImport(importLib, CallingConvention = CallingConvention.Cdecl)]
		private static extern void VidyoBandwidthSummaryStatsSettotalTransmitBitRateNative(IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(SizeTMarshaler))]SizeT totalTransmitBitRate);

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

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

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

		/// <summary>
		/// Actual encoder bitrate.
		/// </summary>
		public SizeT actualEncoderBitRate;
		/// <summary>
		/// Available bandwidth.
		/// </summary>
		public SizeT availableBandwidth;
		/// <summary>
		/// Leaky bucket delay.
		/// </summary>
		public SizeT leakyBucketDelay;
		/// <summary>
		/// Bitrate used for retransmission.
		/// </summary>
		public SizeT retransmitBitRate;
		/// <summary>
		/// Target encoder bitrate.
		/// </summary>
		public SizeT targetEncoderBitRate;
		/// <summary>
		/// Total transmit bitrate.
		/// </summary>
		public SizeT totalTransmitBitRate;
		public BandwidthSummaryStats(IntPtr obj){
			if(obj == IntPtr.Zero) {
				objPtr = VidyoBandwidthSummaryStatsConstructDefaultNative();
			}
			else {
				objPtr = VidyoBandwidthSummaryStatsConstructCopyNative(obj);
			}

			actualEncoderBitRate = VidyoBandwidthSummaryStatsGetactualEncoderBitRateNative(objPtr);
			availableBandwidth = VidyoBandwidthSummaryStatsGetavailableBandwidthNative(objPtr);
			leakyBucketDelay = VidyoBandwidthSummaryStatsGetleakyBucketDelayNative(objPtr);
			retransmitBitRate = VidyoBandwidthSummaryStatsGetretransmitBitRateNative(objPtr);
			targetEncoderBitRate = VidyoBandwidthSummaryStatsGettargetEncoderBitRateNative(objPtr);
			totalTransmitBitRate = VidyoBandwidthSummaryStatsGettotalTransmitBitRateNative(objPtr);
		}
		~BandwidthSummaryStats() {
			VidyoBandwidthSummaryStatsDestructNative(objPtr);
		 }
	};
}
