context: // ===================================================================================================
  //                           _  __     _ _
  //                          | |/ /__ _| | |_ _  _ _ _ __ _
  //                          | ' </ _` | |  _| || | '_/ _` |
  //                          |_|\_\__,_|_|\__|\_,_|_| \__,_|
  //
  // This file is part of the Kaltura Collaborative Media Suite which allows users
  // to do with audio, video, and animation what Wiki platforms allow them to do with
  // text.
  //
  // Copyright (C) 2006-2022  Kaltura Inc.
  //
  // This program is free software: you can redistribute it and/or modify
  // it under the terms of the GNU Affero General Public License as
  // published by the Free Software Foundation, either version 3 of the
  // License, or (at your option) any later version.
  //
  // This program is distributed in the hope that it will be useful,
  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  // GNU Affero General Public License for more details.
  //
  // You should have received a copy of the GNU Affero General Public License
  // along with this program.  If not, see <http://www.gnu.org/licenses/>.
  //
  // @ignore
  // ===================================================================================================
  using System;
  using System.Xml;
  using System.Collections.Generic;
  using Kaltura.Enums;
  using Kaltura.Request;
  using Newtonsoft.Json;
  using Newtonsoft.Json.Linq;
  
  namespace Kaltura.Types
  {
  	public class BaseUser : ObjectBase
  	{
  		#region Constants
  		public const string ID = "id";
  		public const string PARTNER_ID = "partnerId";
  		public const string SCREEN_NAME = "screenName";
  		public const string FULL_NAME = "fullName";
  		public const string EMAIL = "email";
  		public const string COUNTRY = "country";
  		public const string STATE = "state";
  		public const string CITY = "city";
  		public const string ZIP = "zip";
  		public const string THUMBNAIL_URL = "thumbnailUrl";
  		public const string DESCRIPTION = "description";
  		public const string TAGS = "tags";
  		public const string ADMIN_TAGS = "adminTags";
  		public const string STATUS = "status";
  		public const string CREATED_AT = "createdAt";
  		public const string UPDATED_AT = "updatedAt";
  		public const string PARTNER_DATA = "partnerData";
  		public const string INDEXED_PARTNER_DATA_INT = "indexedPartnerDataInt";
  		public const string INDEXED_PARTNER_DATA_STRING = "indexedPartnerDataString";
  		public const string STORAGE_SIZE = "storageSize";
  		public const string LANGUAGE = "language";
  		public const string LAST_LOGIN_TIME = "lastLoginTime";
  		public const string STATUS_UPDATED_AT = "statusUpdatedAt";
  		public const string DELETED_AT = "deletedAt";
  		public const string ALLOWED_PARTNER_IDS = "allowedPartnerIds";
  		public const string ALLOWED_PARTNER_PACKAGES = "allowedPartnerPackages";
  		public const string USER_MODE = "userMode";
  		#endregion
  
  		#region Private Fields
  		private string _Id = null;
  		private int _PartnerId = Int32.MinValue;
  		private string _ScreenName = null;
  		private string _FullName = null;
  		private string _Email = null;
  		private string _Country = null;
  		private string _State = null;
  		private string _City = null;
  		private string _Zip = null;
  		private string _ThumbnailUrl = null;
  		private string _Description = null;
  		private string _Tags = null;
  		private string _AdminTags = null;
  		private UserStatus _Status = (UserStatus)Int32.MinValue;
  		private int _CreatedAt = Int32.MinValue;
  		private int _UpdatedAt = Int32.MinValue;
  		private string _PartnerData = null;
  		private int _IndexedPartnerDataInt = Int32.MinValue;
  		private string _IndexedPartnerDataString = null;
  		private int _StorageSize = Int32.MinValue;
  		private LanguageCode _Language = null;
  		private int _LastLoginTime = Int32.MinValue;
  		private int _StatusUpdatedAt = Int32.MinValue;
  		private int _DeletedAt = Int32.MinValue;
  		private string _AllowedPartnerIds = null;
  		private string _AllowedPartnerPackages = null;
  		private UserMode _UserMode = (UserMode)Int32.MinValue;
  		#endregion
  
  		#region Properties
  		/// <summary>
  		/// Use IdAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public string Id
  		{
  			get { return _Id; }
  			set 
  			{ 
  				_Id = value;
  				OnPropertyChanged("Id");
  			}
  		}
  		/// <summary>
  		/// Use PartnerIdAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public int PartnerId
  		{
  			get { return _PartnerId; }
  			private set 
  			{ 
  				_PartnerId = value;
  				OnPropertyChanged("PartnerId");
  			}
  		}
  		/// <summary>
  		/// Use ScreenNameAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public string ScreenName
  		{
  			get { return _ScreenName; }
  			set 
  			{ 
  				_ScreenName = value;
  				OnPropertyChanged("ScreenName");
  			}
  		}
  		/// <summary>
  		/// Use FullNameAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public string FullName
  		{
  			get { return _FullName; }
  			set 
  			{ 
  				_FullName = value;
  				OnPropertyChanged("FullName");
  			}
  		}
  		/// <summary>
  		/// Use EmailAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public string Email
  		{
  			get { return _Email; }
  			set 
  			{ 
  				_Email = value;
  				OnPropertyChanged("Email");
  			}
  		}
  		/// <summary>
  		/// Use CountryAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public string Country
  		{
  			get { return _Country; }
  			set 
  			{ 
  				_Country = value;
  				OnPropertyChanged("Country");
  			}
  		}
  		/// <summary>
  		/// Use StateAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public string State
  		{
  			get { return _State; }
  			set 
  			{ 
  				_State = value;
  				OnPropertyChanged("State");
  			}
  		}
  		/// <summary>
  		/// Use CityAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public string City
  		{
  			get { return _City; }
  			set 
  			{ 
  				_City = value;
  				OnPropertyChanged("City");
  			}
  		}
  		/// <summary>
  		/// Use ZipAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public string Zip
  		{
  			get { return _Zip; }
  			set 
  			{ 
  				_Zip = value;
  				OnPropertyChanged("Zip");
  			}
  		}
  		/// <summary>
  		/// Use ThumbnailUrlAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public string ThumbnailUrl
  		{
  			get { return _ThumbnailUrl; }
  			set 
  			{ 
  				_ThumbnailUrl = value;
  				OnPropertyChanged("ThumbnailUrl");
  			}
  		}
  		/// <summary>
  		/// Use DescriptionAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public string Description
  		{
  			get { return _Description; }
  			set 
  			{ 
  				_Description = value;
  				OnPropertyChanged("Description");
  			}
  		}
  		/// <summary>
  		/// Use TagsAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public string Tags
  		{
  			get { return _Tags; }
  			set 
  			{ 
  				_Tags = value;
  				OnPropertyChanged("Tags");
  			}
  		}
  		/// <summary>
  		/// Use AdminTagsAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public string AdminTags
  		{
  			get { return _AdminTags; }
  			set 
  			{ 
  				_AdminTags = value;
  				OnPropertyChanged("AdminTags");
  			}
  		}
  		/// <summary>
  		/// Use StatusAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public UserStatus Status
  		{
  			get { return _Status; }
  			set 
  			{ 
  				_Status = value;
  				OnPropertyChanged("Status");
  			}
  		}
  		/// <summary>
  		/// Use CreatedAtAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public int CreatedAt
  		{
  			get { return _CreatedAt; }
  			private set 
  			{ 
  				_CreatedAt = value;
  				OnPropertyChanged("CreatedAt");
  			}
  		}
  		/// <summary>
  		/// Use UpdatedAtAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public int UpdatedAt
  		{
  			get { return _UpdatedAt; }
  			private set 
  			{ 
  				_UpdatedAt = value;
  				OnPropertyChanged("UpdatedAt");
  			}
  		}
  		/// <summary>
  		/// Use PartnerDataAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public string PartnerData
  		{
  			get { return _PartnerData; }
  			set 
  			{ 
  				_PartnerData = value;
  				OnPropertyChanged("PartnerData");
  			}
  		}
  		/// <summary>
  		/// Use IndexedPartnerDataIntAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public int IndexedPartnerDataInt
  		{
  			get { return _IndexedPartnerDataInt; }
  			set 
  			{ 
  				_IndexedPartnerDataInt = value;
  				OnPropertyChanged("IndexedPartnerDataInt");
  			}
  		}
  		/// <summary>
  		/// Use IndexedPartnerDataStringAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public string IndexedPartnerDataString
  		{
  			get { return _IndexedPartnerDataString; }
  			set 
  			{ 
  				_IndexedPartnerDataString = value;
  				OnPropertyChanged("IndexedPartnerDataString");
  			}
  		}
  		/// <summary>
  		/// Use StorageSizeAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public int StorageSize
  		{
  			get { return _StorageSize; }
  			private set 
  			{ 
  				_StorageSize = value;
  				OnPropertyChanged("StorageSize");
  			}
  		}
  		/// <summary>
  		/// Use LanguageAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public LanguageCode Language
  		{
  			get { return _Language; }
  			set 
  			{ 
  				_Language = value;
  				OnPropertyChanged("Language");
  			}
  		}
  		/// <summary>
  		/// Use LastLoginTimeAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public int LastLoginTime
  		{
  			get { return _LastLoginTime; }
  			private set 
  			{ 
  				_LastLoginTime = value;
  				OnPropertyChanged("LastLoginTime");
  			}
  		}
  		/// <summary>
  		/// Use StatusUpdatedAtAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public int StatusUpdatedAt
  		{
  			get { return _StatusUpdatedAt; }
  			private set 
  			{ 
  				_StatusUpdatedAt = value;
  				OnPropertyChanged("StatusUpdatedAt");
  			}
  		}
  		/// <summary>
  		/// Use DeletedAtAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public int DeletedAt
  		{
  			get { return _DeletedAt; }
  			private set 
  			{ 
  				_DeletedAt = value;
  				OnPropertyChanged("DeletedAt");
  			}
  		}
  		/// <summary>
  		/// Use AllowedPartnerIdsAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public string AllowedPartnerIds
  		{
  			get { return _AllowedPartnerIds; }
  			set 
  			{ 
  				_AllowedPartnerIds = value;
  				OnPropertyChanged("AllowedPartnerIds");
  			}
  		}
  		/// <summary>
  		/// Use AllowedPartnerPackagesAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public string AllowedPartnerPackages
  		{
  			get { return _AllowedPartnerPackages; }
  			set 
  			{ 
  				_AllowedPartnerPackages = value;
  				OnPropertyChanged("AllowedPartnerPackages");
  			}
  		}
  		/// <summary>
  		/// Use UserModeAsDouble property instead
  		/// </summary>
  		[JsonProperty]
  		public UserMode UserMode
  		{
  			get { return _UserMode; }
  			set 
  			{ 
  				_UserMode = value;
  				OnPropertyChanged("UserMode");
  			}
  		}
  		#endregion
  
  		#region CTor
  		public BaseUser()
  		{
  		}
  
  		public BaseUser(JToken node) : base(node)
  		{
  			if(node["id"] != null)
  			{
  				this._Id = node["id"].Value<string>();
  			}
  			if(node["partnerId"] != null)
  			{
  				this._PartnerId = ParseInt(node["partnerId"].Value<string>());
  			}
  			if(node["screenName"] != null)
  			{
  				this._ScreenName = node["screenName"].Value<string>();
  			}
  			if(node["fullName"] != null)
  			{
  				this._FullName = node["fullName"].Value<string>();
  			}
  			if(node["email"] != null)
  			{
  				this._Email = node["email"].Value<string>();
  			}
  			if(node["country"] != null)
  			{
  				this._Country = node["country"].Value<string>();
  			}
  			if(node["state"] != null)
  			{
  				this._State = node["state"].Value<string>();
  			}
  			if(node["city"] != null)
  			{
  				this._City = node["city"].Value<string>();
  			}
  			if(node["zip"] != null)
  			{
  				this._Zip = node["zip"].Value<string>();
  			}
  			if(node["thumbnailUrl"] != null)
  			{
  				this._ThumbnailUrl = node["thumbnailUrl"].Value<string>();
  			}
  			if(node["description"] != null)
  			{
  				this._Description = node["description"].Value<string>();
  			}
  			if(node["tags"] != null)
  			{
  
gt: 				this._Tags = node["tags"].Value<string>();