FrameworkTemplate/SolutionTemplate/Entities/Context/SystemUser.cs

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using DG.XrmContext;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Client;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Linq.Expressions;
using System.Runtime.Serialization;


namespace Entities {
    
    
    /// <summary>
    /// <para>Person with access to the Microsoft CRM system and who owns objects in the Microsoft CRM database.</para>
    /// <para>Display Name: User</para>
    /// </summary>
    [EntityLogicalName("systemuser")]
    [DebuggerDisplay("{DebuggerDisplay,nq}")]
    [DataContract()]
    public partial class SystemUser : ExtendedEntity<EmptyEnum, EmptyEnum> {
        
        public const string EntityLogicalName = "systemuser";
        
        public const int EntityTypeCode = 8;
        
        public SystemUser() :
                base(EntityLogicalName) {
        }
        
        public SystemUser(Guid Id) :
                base(EntityLogicalName, Id) {
        }
        
        private string DebuggerDisplay {
            get {
                return GetDebuggerDisplay("fullname");
            }
        }
        
        [AttributeLogicalName("systemuserid")]
        public override Guid Id {
            get {
                return base.Id;
            }
            set {
                SetId("systemuserid", value);
            }
        }
        
        /// <summary>
        /// <para>Unique identifier for the user.</para>
        /// <para>Display Name: User</para>
        /// </summary>
        [AttributeLogicalName("systemuserid")]
        public Guid? SystemUserId {
            get {
                return GetAttributeValue<Guid?>("systemuserid");
            }
            set {
                SetId("systemuserid", value);
            }
        }
        
        /// <summary>
        /// <para>Type of user.</para>
        /// <para>Display Name: Access Mode</para>
        /// </summary>
        [AttributeLogicalName("accessmode")]
        public SystemUser_AccessMode? AccessMode {
            get {
                return GetOptionSetValue<SystemUser_AccessMode>("accessmode");
            }
            set {
                SetOptionSetValue("accessmode", value);
            }
        }
        
        /// <summary>
        /// <para>Unique identifier for address 1.</para>
        /// <para>Display Name: Address 1: ID</para>
        /// </summary>
        [AttributeLogicalName("address1_addressid")]
        public Guid? Address1_AddressId {
            get {
                return GetAttributeValue<Guid?>("address1_addressid");
            }
            set {
                SetAttributeValue("address1_addressid", value);
            }
        }
        
        /// <summary>
        /// <para>Type of address for address 1, such as billing, shipping, or primary address.</para>
        /// <para>Display Name: Address 1: Address Type</para>
        /// </summary>
        [AttributeLogicalName("address1_addresstypecode")]
        public SystemUser_Address1_AddressTypeCode? Address1_AddressTypeCode {
            get {
                return GetOptionSetValue<SystemUser_Address1_AddressTypeCode>("address1_addresstypecode");
            }
            set {
                SetOptionSetValue("address1_addresstypecode", value);
            }
        }
        
        /// <summary>
        /// <para>City name for address 1.</para>
        /// <para>Display Name: City</para>
        /// </summary>
        [AttributeLogicalName("address1_city")]
        public string Address1_City {
            get {
                return GetAttributeValue<string>("address1_city");
            }
            set {
                SetAttributeValue("address1_city", value);
            }
        }
        
        /// <summary>
        /// <para>Shows the complete primary address.</para>
        /// <para>Display Name: Address</para>
        /// </summary>
        [AttributeLogicalName("address1_composite")]
        public string Address1_Composite {
            get {
                return GetAttributeValue<string>("address1_composite");
            }
        }
        
        /// <summary>
        /// <para>Country/region name in address 1.</para>
        /// <para>Display Name: Country/Region</para>
        /// </summary>
        [AttributeLogicalName("address1_country")]
        public string Address1_Country {
            get {
                return GetAttributeValue<string>("address1_country");
            }
            set {
                SetAttributeValue("address1_country", value);
            }
        }
        
        /// <summary>
        /// <para>County name for address 1.</para>
        /// <para>Display Name: Address 1: County</para>
        /// </summary>
        [AttributeLogicalName("address1_county")]
        public string Address1_County {
            get {
                return GetAttributeValue<string>("address1_county");
            }
            set {
                SetAttributeValue("address1_county", value);
            }
        }
        
        /// <summary>
        /// <para>Fax number for address 1.</para>
        /// <para>Display Name: Address 1: Fax</para>
        /// </summary>
        [AttributeLogicalName("address1_fax")]
        public string Address1_Fax {
            get {
                return GetAttributeValue<string>("address1_fax");
            }
            set {
                SetAttributeValue("address1_fax", value);
            }
        }
        
        /// <summary>
        /// <para>Latitude for address 1.</para>
        /// <para>Display Name: Address 1: Latitude</para>
        /// </summary>
        [AttributeLogicalName("address1_latitude")]
        public double? Address1_Latitude {
            get {
                return GetAttributeValue<double?>("address1_latitude");
            }
            set {
                SetAttributeValue("address1_latitude", value);
            }
        }
        
        /// <summary>
        /// <para>First line for entering address 1 information.</para>
        /// <para>Display Name: Street 1</para>
        /// </summary>
        [AttributeLogicalName("address1_line1")]
        public string Address1_Line1 {
            get {
                return GetAttributeValue<string>("address1_line1");
            }
            set {
                SetAttributeValue("address1_line1", value);
            }
        }
        
        /// <summary>
        /// <para>Second line for entering address 1 information.</para>
        /// <para>Display Name: Street 2</para>
        /// </summary>
        [AttributeLogicalName("address1_line2")]
        public string Address1_Line2 {
            get {
                return GetAttributeValue<string>("address1_line2");
            }
            set {
                SetAttributeValue("address1_line2", value);
            }
        }
        
        /// <summary>
        /// <para>Third line for entering address 1 information.</para>
        /// <para>Display Name: Street 3</para>
        /// </summary>
        [AttributeLogicalName("address1_line3")]
        public string Address1_Line3 {
            get {
                return GetAttributeValue<string>("address1_line3");
            }
            set {
                SetAttributeValue("address1_line3", value);
            }
        }
        
        /// <summary>
        /// <para>Longitude for address 1.</para>
        /// <para>Display Name: Address 1: Longitude</para>
        /// </summary>
        [AttributeLogicalName("address1_longitude")]
        public double? Address1_Longitude {
            get {
                return GetAttributeValue<double?>("address1_longitude");
            }
            set {
                SetAttributeValue("address1_longitude", value);
            }
        }
        
        /// <summary>
        /// <para>Name to enter for address 1.</para>
        /// <para>Display Name: Address 1: Name</para>
        /// </summary>
        [AttributeLogicalName("address1_name")]
        public string Address1_Name {
            get {
                return GetAttributeValue<string>("address1_name");
            }
            set {
                SetAttributeValue("address1_name", value);
            }
        }
        
        /// <summary>
        /// <para>Post office box number for address 1.</para>
        /// <para>Display Name: Address 1: Post Office Box</para>
        /// </summary>
        [AttributeLogicalName("address1_postofficebox")]
        public string Address1_PostOfficeBox {
            get {
                return GetAttributeValue<string>("address1_postofficebox");
            }
            set {
                SetAttributeValue("address1_postofficebox", value);
            }
        }
        
        /// <summary>
        /// <para>ZIP Code or postal code for address 1.</para>
        /// <para>Display Name: ZIP/Postal Code</para>
        /// </summary>
        [AttributeLogicalName("address1_postalcode")]
        public string Address1_PostalCode {
            get {
                return GetAttributeValue<string>("address1_postalcode");
            }
            set {
                SetAttributeValue("address1_postalcode", value);
            }
        }
        
        /// <summary>
        /// <para>Method of shipment for address 1.</para>
        /// <para>Display Name: Address 1: Shipping Method</para>
        /// </summary>
        [AttributeLogicalName("address1_shippingmethodcode")]
        public SystemUser_Address1_ShippingMethodCode? Address1_ShippingMethodCode {
            get {
                return GetOptionSetValue<SystemUser_Address1_ShippingMethodCode>("address1_shippingmethodcode");
            }
            set {
                SetOptionSetValue("address1_shippingmethodcode", value);
            }
        }
        
        /// <summary>
        /// <para>State or province for address 1.</para>
        /// <para>Display Name: State/Province</para>
        /// </summary>
        [AttributeLogicalName("address1_stateorprovince")]
        public string Address1_StateOrProvince {
            get {
                return GetAttributeValue<string>("address1_stateorprovince");
            }
            set {
                SetAttributeValue("address1_stateorprovince", value);
            }
        }
        
        /// <summary>
        /// <para>First telephone number associated with address 1.</para>
        /// <para>Display Name: Main Phone</para>
        /// </summary>
        [AttributeLogicalName("address1_telephone1")]
        public string Address1_Telephone1 {
            get {
                return GetAttributeValue<string>("address1_telephone1");
            }
            set {
                SetAttributeValue("address1_telephone1", value);
            }
        }
        
        /// <summary>
        /// <para>Second telephone number associated with address 1.</para>
        /// <para>Display Name: Other Phone</para>
        /// </summary>
        [AttributeLogicalName("address1_telephone2")]
        public string Address1_Telephone2 {
            get {
                return GetAttributeValue<string>("address1_telephone2");
            }
            set {
                SetAttributeValue("address1_telephone2", value);
            }
        }
        
        /// <summary>
        /// <para>Third telephone number associated with address 1.</para>
        /// <para>Display Name: Pager</para>
        /// </summary>
        [AttributeLogicalName("address1_telephone3")]
        public string Address1_Telephone3 {
            get {
                return GetAttributeValue<string>("address1_telephone3");
            }
            set {
                SetAttributeValue("address1_telephone3", value);
            }
        }
        
        /// <summary>
        /// <para>United Parcel Service (UPS) zone for address 1.</para>
        /// <para>Display Name: Address 1: UPS Zone</para>
        /// </summary>
        [AttributeLogicalName("address1_upszone")]
        public string Address1_UPSZone {
            get {
                return GetAttributeValue<string>("address1_upszone");
            }
            set {
                SetAttributeValue("address1_upszone", value);
            }
        }
        
        /// <summary>
        /// <para>UTC offset for address 1. This is the difference between local time and standard Coordinated Universal Time.</para>
        /// <para>Display Name: Address 1: UTC Offset</para>
        /// </summary>
        [AttributeLogicalName("address1_utcoffset")]
        public int? Address1_UTCOffset {
            get {
                return GetAttributeValue<int?>("address1_utcoffset");
            }
            set {
                SetAttributeValue("address1_utcoffset", value);
            }
        }
        
        /// <summary>
        /// <para>Unique identifier for address 2.</para>
        /// <para>Display Name: Address 2: ID</para>
        /// </summary>
        [AttributeLogicalName("address2_addressid")]
        public Guid? Address2_AddressId {
            get {
                return GetAttributeValue<Guid?>("address2_addressid");
            }
            set {
                SetAttributeValue("address2_addressid", value);
            }
        }
        
        /// <summary>
        /// <para>Type of address for address 2, such as billing, shipping, or primary address.</para>
        /// <para>Display Name: Address 2: Address Type</para>
        /// </summary>
        [AttributeLogicalName("address2_addresstypecode")]
        public SystemUser_Address2_AddressTypeCode? Address2_AddressTypeCode {
            get {
                return GetOptionSetValue<SystemUser_Address2_AddressTypeCode>("address2_addresstypecode");
            }
            set {
                SetOptionSetValue("address2_addresstypecode", value);
            }
        }
        
        /// <summary>
        /// <para>City name for address 2.</para>
        /// <para>Display Name: Other City</para>
        /// </summary>
        [AttributeLogicalName("address2_city")]
        public string Address2_City {
            get {
                return GetAttributeValue<string>("address2_city");
            }
            set {
                SetAttributeValue("address2_city", value);
            }
        }
        
        /// <summary>
        /// <para>Shows the complete secondary address.</para>
        /// <para>Display Name: Other Address</para>
        /// </summary>
        [AttributeLogicalName("address2_composite")]
        public string Address2_Composite {
            get {
                return GetAttributeValue<string>("address2_composite");
            }
        }
        
        /// <summary>
        /// <para>Country/region name in address 2.</para>
        /// <para>Display Name: Other Country/Region</para>
        /// </summary>
        [AttributeLogicalName("address2_country")]
        public string Address2_Country {
            get {
                return GetAttributeValue<string>("address2_country");
            }
            set {
                SetAttributeValue("address2_country", value);
            }
        }
        
        /// <summary>
        /// <para>County name for address 2.</para>
        /// <para>Display Name: Address 2: County</para>
        /// </summary>
        [AttributeLogicalName("address2_county")]
        public string Address2_County {
            get {
                return GetAttributeValue<string>("address2_county");
            }
            set {
                SetAttributeValue("address2_county", value);
            }
        }
        
        /// <summary>
        /// <para>Fax number for address 2.</para>
        /// <para>Display Name: Address 2: Fax</para>
        /// </summary>
        [AttributeLogicalName("address2_fax")]
        public string Address2_Fax {
            get {
                return GetAttributeValue<string>("address2_fax");
            }
            set {
                SetAttributeValue("address2_fax", value);
            }
        }
        
        /// <summary>
        /// <para>Latitude for address 2.</para>
        /// <para>Display Name: Address 2: Latitude</para>
        /// </summary>
        [AttributeLogicalName("address2_latitude")]
        public double? Address2_Latitude {
            get {
                return GetAttributeValue<double?>("address2_latitude");
            }
            set {
                SetAttributeValue("address2_latitude", value);
            }
        }
        
        /// <summary>
        /// <para>First line for entering address 2 information.</para>
        /// <para>Display Name: Other Street 1</para>
        /// </summary>
        [AttributeLogicalName("address2_line1")]
        public string Address2_Line1 {
            get {
                return GetAttributeValue<string>("address2_line1");
            }
            set {
                SetAttributeValue("address2_line1", value);
            }
        }
        
        /// <summary>
        /// <para>Second line for entering address 2 information.</para>
        /// <para>Display Name: Other Street 2</para>
        /// </summary>
        [AttributeLogicalName("address2_line2")]
        public string Address2_Line2 {
            get {
                return GetAttributeValue<string>("address2_line2");
            }
            set {
                SetAttributeValue("address2_line2", value);
            }
        }
        
        /// <summary>
        /// <para>Third line for entering address 2 information.</para>
        /// <para>Display Name: Other Street 3</para>
        /// </summary>
        [AttributeLogicalName("address2_line3")]
        public string Address2_Line3 {
            get {
                return GetAttributeValue<string>("address2_line3");
            }
            set {
                SetAttributeValue("address2_line3", value);
            }
        }
        
        /// <summary>
        /// <para>Longitude for address 2.</para>
        /// <para>Display Name: Address 2: Longitude</para>
        /// </summary>
        [AttributeLogicalName("address2_longitude")]
        public double? Address2_Longitude {
            get {
                return GetAttributeValue<double?>("address2_longitude");
            }
            set {
                SetAttributeValue("address2_longitude", value);
            }
        }
        
        /// <summary>
        /// <para>Name to enter for address 2.</para>
        /// <para>Display Name: Address 2: Name</para>
        /// </summary>
        [AttributeLogicalName("address2_name")]
        public string Address2_Name {
            get {
                return GetAttributeValue<string>("address2_name");
            }
            set {
                SetAttributeValue("address2_name", value);
            }
        }
        
        /// <summary>
        /// <para>Post office box number for address 2.</para>
        /// <para>Display Name: Address 2: Post Office Box</para>
        /// </summary>
        [AttributeLogicalName("address2_postofficebox")]
        public string Address2_PostOfficeBox {
            get {
                return GetAttributeValue<string>("address2_postofficebox");
            }
            set {
                SetAttributeValue("address2_postofficebox", value);
            }
        }
        
        /// <summary>
        /// <para>ZIP Code or postal code for address 2.</para>
        /// <para>Display Name: Other ZIP/Postal Code</para>
        /// </summary>
        [AttributeLogicalName("address2_postalcode")]
        public string Address2_PostalCode {
            get {
                return GetAttributeValue<string>("address2_postalcode");
            }
            set {
                SetAttributeValue("address2_postalcode", value);
            }
        }
        
        /// <summary>
        /// <para>Method of shipment for address 2.</para>
        /// <para>Display Name: Address 2: Shipping Method</para>
        /// </summary>
        [AttributeLogicalName("address2_shippingmethodcode")]
        public SystemUser_Address2_ShippingMethodCode? Address2_ShippingMethodCode {
            get {
                return GetOptionSetValue<SystemUser_Address2_ShippingMethodCode>("address2_shippingmethodcode");
            }
            set {
                SetOptionSetValue("address2_shippingmethodcode", value);
            }
        }
        
        /// <summary>
        /// <para>State or province for address 2.</para>
        /// <para>Display Name: Other State/Province</para>
        /// </summary>
        [AttributeLogicalName("address2_stateorprovince")]
        public string Address2_StateOrProvince {
            get {
                return GetAttributeValue<string>("address2_stateorprovince");
            }
            set {
                SetAttributeValue("address2_stateorprovince", value);
            }
        }
        
        /// <summary>
        /// <para>First telephone number associated with address 2.</para>
        /// <para>Display Name: Address 2: Telephone 1</para>
        /// </summary>
        [AttributeLogicalName("address2_telephone1")]
        public string Address2_Telephone1 {
            get {
                return GetAttributeValue<string>("address2_telephone1");
            }
            set {
                SetAttributeValue("address2_telephone1", value);
            }
        }
        
        /// <summary>
        /// <para>Second telephone number associated with address 2.</para>
        /// <para>Display Name: Address 2: Telephone 2</para>
        /// </summary>
        [AttributeLogicalName("address2_telephone2")]
        public string Address2_Telephone2 {
            get {
                return GetAttributeValue<string>("address2_telephone2");
            }
            set {
                SetAttributeValue("address2_telephone2", value);
            }
        }
        
        /// <summary>
        /// <para>Third telephone number associated with address 2.</para>
        /// <para>Display Name: Address 2: Telephone 3</para>
        /// </summary>
        [AttributeLogicalName("address2_telephone3")]
        public string Address2_Telephone3 {
            get {
                return GetAttributeValue<string>("address2_telephone3");
            }
            set {
                SetAttributeValue("address2_telephone3", value);
            }
        }
        
        /// <summary>
        /// <para>United Parcel Service (UPS) zone for address 2.</para>
        /// <para>Display Name: Address 2: UPS Zone</para>
        /// </summary>
        [AttributeLogicalName("address2_upszone")]
        public string Address2_UPSZone {
            get {
                return GetAttributeValue<string>("address2_upszone");
            }
            set {
                SetAttributeValue("address2_upszone", value);
            }
        }
        
        /// <summary>
        /// <para>UTC offset for address 2. This is the difference between local time and standard Coordinated Universal Time.</para>
        /// <para>Display Name: Address 2: UTC Offset</para>
        /// </summary>
        [AttributeLogicalName("address2_utcoffset")]
        public int? Address2_UTCOffset {
            get {
                return GetAttributeValue<int?>("address2_utcoffset");
            }
            set {
                SetAttributeValue("address2_utcoffset", value);
            }
        }
        
        /// <summary>
        /// <para>The identifier for the application. This is used to access data in another application.</para>
        /// <para>Display Name: Application ID</para>
        /// </summary>
        [AttributeLogicalName("applicationid")]
        public Guid? ApplicationId {
            get {
                return GetAttributeValue<Guid?>("applicationid");
            }
            set {
                SetAttributeValue("applicationid", value);
            }
        }
        
        /// <summary>
        /// <para>The URI used as a unique logical identifier for the external app. This can be used to validate the application.</para>
        /// <para>Display Name: Application ID URI</para>
        /// </summary>
        [AttributeLogicalName("applicationiduri")]
        public string ApplicationIdUri {
            get {
                return GetAttributeValue<string>("applicationiduri");
            }
        }
        
        /// <summary>
        /// <para>This is the application directory object Id.</para>
        /// <para>Display Name: Azure AD Object ID</para>
        /// </summary>
        [AttributeLogicalName("azureactivedirectoryobjectid")]
        public Guid? AzureActiveDirectoryObjectId {
            get {
                return GetAttributeValue<Guid?>("azureactivedirectoryobjectid");
            }
        }
        
        /// <summary>
        /// <para>Unique identifier of the business unit with which the user is associated.</para>
        /// <para>Display Name: Business Unit</para>
        /// </summary>
        [AttributeLogicalName("businessunitid")]
        public EntityReference BusinessUnitId {
            get {
                return GetAttributeValue<EntityReference>("businessunitid");
            }
            set {
                SetAttributeValue("businessunitid", value);
            }
        }
        
        /// <summary>
        /// <para>License type of user.</para>
        /// <para>Display Name: License Type</para>
        /// </summary>
        [AttributeLogicalName("caltype")]
        public SystemUser_CALType? CALType {
            get {
                return GetOptionSetValue<SystemUser_CALType>("caltype");
            }
            set {
                SetOptionSetValue("caltype", value);
            }
        }
        
        /// <summary>
        /// <para>Fiscal calendar associated with the user.</para>
        /// <para>Display Name: Calendar</para>
        /// </summary>
        [AttributeLogicalName("calendarid")]
        public EntityReference CalendarId {
            get {
                return GetAttributeValue<EntityReference>("calendarid");
            }
            set {
                SetAttributeValue("calendarid", value);
            }
        }
        
        /// <summary>
        /// <para>Unique identifier of the user who created the user.</para>
        /// <para>Display Name: Created By</para>
        /// </summary>
        [AttributeLogicalName("createdby")]
        public EntityReference CreatedBy {
            get {
                return GetAttributeValue<EntityReference>("createdby");
            }
        }
        
        /// <summary>
        /// <para>Date and time when the user was created.</para>
        /// <para>Display Name: Created On</para>
        /// </summary>
        [AttributeLogicalName("createdon")]
        public DateTime? CreatedOn {
            get {
                return GetAttributeValue<DateTime?>("createdon");
            }
        }
        
        /// <summary>
        /// <para>Unique identifier of the delegate user who created the systemuser.</para>
        /// <para>Display Name: Created By (Delegate)</para>
        /// </summary>
        [AttributeLogicalName("createdonbehalfby")]
        public EntityReference CreatedOnBehalfBy {
            get {
                return GetAttributeValue<EntityReference>("createdonbehalfby");
            }
        }
        
        /// <summary>
        /// <para>Indicates if default outlook filters have been populated.</para>
        /// <para>Display Name: Default Filters Populated</para>
        /// </summary>
        [AttributeLogicalName("defaultfilterspopulated")]
        public bool? DefaultFiltersPopulated {
            get {
                return GetAttributeValue<bool?>("defaultfilterspopulated");
            }
        }
        
        /// <summary>
        /// <para>Select the mailbox associated with this user.</para>
        /// <para>Display Name: Mailbox</para>
        /// </summary>
        [AttributeLogicalName("defaultmailbox")]
        public EntityReference DefaultMailbox {
            get {
                return GetAttributeValue<EntityReference>("defaultmailbox");
            }
        }
        
        /// <summary>
        /// <para>Type a default folder name for the user's OneDrive For Business location.</para>
        /// <para>Display Name: Default OneDrive for Business Folder Name</para>
        /// </summary>
        [AttributeLogicalName("defaultodbfoldername")]
        public string DefaultOdbFolderName {
            get {
                return GetAttributeValue<string>("defaultodbfoldername");
            }
        }
        
        /// <summary>
        /// <para>Reason for disabling the user.</para>
        /// <para>Display Name: Disabled Reason</para>
        /// </summary>
        [AttributeLogicalName("disabledreason")]
        public string DisabledReason {
            get {
                return GetAttributeValue<string>("disabledreason");
            }
        }
        
        /// <summary>
        /// <para>Whether to display the user in service views.</para>
        /// <para>Display Name: Display in Service Views</para>
        /// </summary>
        [AttributeLogicalName("displayinserviceviews")]
        public bool? DisplayInServiceViews {
            get {
                return GetAttributeValue<bool?>("displayinserviceviews");
            }
            set {
                SetAttributeValue("displayinserviceviews", value);
            }
        }
        
        /// <summary>
        /// <para>Active Directory domain of which the user is a member.</para>
        /// <para>Display Name: User Name</para>
        /// </summary>
        [AttributeLogicalName("domainname")]
        public string DomainName {
            get {
                return GetAttributeValue<string>("domainname");
            }
            set {
                SetAttributeValue("domainname", value);
            }
        }
        
        /// <summary>
        /// <para>Shows the status of the primary email address.</para>
        /// <para>Display Name: Primary Email Status</para>
        /// </summary>
        [AttributeLogicalName("emailrouteraccessapproval")]
        public SystemUser_EmailRouterAccessApproval? EmailRouterAccessApproval {
            get {
                return GetOptionSetValue<SystemUser_EmailRouterAccessApproval>("emailrouteraccessapproval");
            }
            set {
                SetOptionSetValue("emailrouteraccessapproval", value);
            }
        }
        
        /// <summary>
        /// <para>Employee identifier for the user.</para>
        /// <para>Display Name: Employee</para>
        /// </summary>
        [AttributeLogicalName("employeeid")]
        public string EmployeeId {
            get {
                return GetAttributeValue<string>("employeeid");
            }
            set {
                SetAttributeValue("employeeid", value);
            }
        }
        
        /// <summary>
        /// <para>For internal use only.</para>
        /// <para>Display Name: Entity Image Id</para>
        /// </summary>
        [AttributeLogicalName("entityimageid")]
        public Guid? EntityImageId {
            get {
                return GetAttributeValue<Guid?>("entityimageid");
            }
        }
        
        /// <summary>
        /// <para>Exchange rate for the currency associated with the systemuser with respect to the base currency.</para>
        /// <para>Display Name: Exchange Rate</para>
        /// </summary>
        [AttributeLogicalName("exchangerate")]
        public decimal? ExchangeRate {
            get {
                return GetAttributeValue<decimal?>("exchangerate");
            }
        }
        
        /// <summary>
        /// <para>First name of the user.</para>
        /// <para>Display Name: First Name</para>
        /// </summary>
        [AttributeLogicalName("firstname")]
        public string FirstName {
            get {
                return GetAttributeValue<string>("firstname");
            }
            set {
                SetAttributeValue("firstname", value);
            }
        }
        
        /// <summary>
        /// <para>Full name of the user.</para>
        /// <para>Display Name: Full Name</para>
        /// </summary>
        [AttributeLogicalName("fullname")]
        public string FullName {
            get {
                return GetAttributeValue<string>("fullname");
            }
        }
        
        /// <summary>
        /// <para>Government identifier for the user.</para>
        /// <para>Display Name: Government</para>
        /// </summary>
        [AttributeLogicalName("governmentid")]
        public string GovernmentId {
            get {
                return GetAttributeValue<string>("governmentid");
            }
            set {
                SetAttributeValue("governmentid", value);
            }
        }
        
        /// <summary>
        /// <para>Home phone number for the user.</para>
        /// <para>Display Name: Home Phone</para>
        /// </summary>
        [AttributeLogicalName("homephone")]
        public string HomePhone {
            get {
                return GetAttributeValue<string>("homephone");
            }
            set {
                SetAttributeValue("homephone", value);
            }
        }
        
        /// <summary>
        /// <para>For internal use only.</para>
        /// <para>Display Name: Unique user identity id</para>
        /// </summary>
        [AttributeLogicalName("identityid")]
        public int? IdentityId {
            get {
                return GetAttributeValue<int?>("identityid");
            }
        }
        
        /// <summary>
        /// <para>Unique identifier of the data import or data migration that created this record.</para>
        /// <para>Display Name: Import Sequence Number</para>
        /// </summary>
        [AttributeLogicalName("importsequencenumber")]
        public int? ImportSequenceNumber {
            get {
                return GetAttributeValue<int?>("importsequencenumber");
            }
            set {
                SetAttributeValue("importsequencenumber", value);
            }
        }
        
        /// <summary>
        /// <para>Incoming email delivery method for the user.</para>
        /// <para>Display Name: Incoming Email Delivery Method</para>
        /// </summary>
        [AttributeLogicalName("incomingemaildeliverymethod")]
        public SystemUser_IncomingEmailDeliveryMethod? IncomingEmailDeliveryMethod {
            get {
                return GetOptionSetValue<SystemUser_IncomingEmailDeliveryMethod>("incomingemaildeliverymethod");
            }
            set {
                SetOptionSetValue("incomingemaildeliverymethod", value);
            }
        }
        
        /// <summary>
        /// <para>Internal email address for the user.</para>
        /// <para>Display Name: Primary Email</para>
        /// </summary>
        [AttributeLogicalName("internalemailaddress")]
        public string InternalEMailAddress {
            get {
                return GetAttributeValue<string>("internalemailaddress");
            }
            set {
                SetAttributeValue("internalemailaddress", value);
            }
        }
        
        /// <summary>
        /// <para>User invitation status.</para>
        /// <para>Display Name: Invitation Status</para>
        /// </summary>
        [AttributeLogicalName("invitestatuscode")]
        public SystemUser_InviteStatusCode? InviteStatusCode {
            get {
                return GetOptionSetValue<SystemUser_InviteStatusCode>("invitestatuscode");
            }
            set {
                SetOptionSetValue("invitestatuscode", value);
            }
        }
        
        /// <summary>
        /// <para>Information about whether the user is enabled.</para>
        /// <para>Display Name: Status</para>
        /// </summary>
        [AttributeLogicalName("isdisabled")]
        public bool? IsDisabled {
            get {
                return GetAttributeValue<bool?>("isdisabled");
            }
            set {
                SetAttributeValue("isdisabled", value);
            }
        }
        
        /// <summary>
        /// <para>Shows the status of approval of the email address by O365 Admin.</para>
        /// <para>Display Name: Email Address O365 Admin Approval Status</para>
        /// </summary>
        [AttributeLogicalName("isemailaddressapprovedbyo365admin")]
        public bool? IsEmailAddressApprovedByO365Admin {
            get {
                return GetAttributeValue<bool?>("isemailaddressapprovedbyo365admin");
            }
        }
        
        /// <summary>
        /// <para>Check if user is an integration user.</para>
        /// <para>Display Name: Integration user mode</para>
        /// </summary>
        [AttributeLogicalName("isintegrationuser")]
        public bool? IsIntegrationUser {
            get {
                return GetAttributeValue<bool?>("isintegrationuser");
            }
            set {
                SetAttributeValue("isintegrationuser", value);
            }
        }
        
        /// <summary>
        /// <para>Information about whether the user is licensed.</para>
        /// <para>Display Name: User Licensed</para>
        /// </summary>
        [AttributeLogicalName("islicensed")]
        public bool? IsLicensed {
            get {
                return GetAttributeValue<bool?>("islicensed");
            }
            set {
                SetAttributeValue("islicensed", value);
            }
        }
        
        /// <summary>
        /// <para>Information about whether the user is synced with the directory.</para>
        /// <para>Display Name: User Synced</para>
        /// </summary>
        [AttributeLogicalName("issyncwithdirectory")]
        public bool? IsSyncWithDirectory {
            get {
                return GetAttributeValue<bool?>("issyncwithdirectory");
            }
            set {
                SetAttributeValue("issyncwithdirectory", value);
            }
        }
        
        /// <summary>
        /// <para>Job title of the user.</para>
        /// <para>Display Name: Job Title</para>
        /// </summary>
        [AttributeLogicalName("jobtitle")]
        public string JobTitle {
            get {
                return GetAttributeValue<string>("jobtitle");
            }
            set {
                SetAttributeValue("jobtitle", value);
            }
        }
        
        /// <summary>
        /// <para>Last name of the user.</para>
        /// <para>Display Name: Last Name</para>
        /// </summary>
        [AttributeLogicalName("lastname")]
        public string LastName {
            get {
                return GetAttributeValue<string>("lastname");
            }
            set {
                SetAttributeValue("lastname", value);
            }
        }
        
        /// <summary>
        /// <para>Middle name of the user.</para>
        /// <para>Display Name: Middle Name</para>
        /// </summary>
        [AttributeLogicalName("middlename")]
        public string MiddleName {
            get {
                return GetAttributeValue<string>("middlename");
            }
            set {
                SetAttributeValue("middlename", value);
            }
        }
        
        /// <summary>
        /// <para>Mobile alert email address for the user.</para>
        /// <para>Display Name: Mobile Alert Email</para>
        /// </summary>
        [AttributeLogicalName("mobilealertemail")]
        public string MobileAlertEMail {
            get {
                return GetAttributeValue<string>("mobilealertemail");
            }
            set {
                SetAttributeValue("mobilealertemail", value);
            }
        }
        
        /// <summary>
        /// <para>Items contained with a particular SystemUser.</para>
        /// <para>Display Name: Mobile Offline Profile</para>
        /// </summary>
        [AttributeLogicalName("mobileofflineprofileid")]
        public EntityReference MobileOfflineProfileId {
            get {
                return GetAttributeValue<EntityReference>("mobileofflineprofileid");
            }
            set {
                SetAttributeValue("mobileofflineprofileid", value);
            }
        }
        
        /// <summary>
        /// <para>Mobile phone number for the user.</para>
        /// <para>Display Name: Mobile Phone</para>
        /// </summary>
        [AttributeLogicalName("mobilephone")]
        public string MobilePhone {
            get {
                return GetAttributeValue<string>("mobilephone");
            }
            set {
                SetAttributeValue("mobilephone", value);
            }
        }
        
        /// <summary>
        /// <para>Unique identifier of the user who last modified the user.</para>
        /// <para>Display Name: Modified By</para>
        /// </summary>
        [AttributeLogicalName("modifiedby")]
        public EntityReference ModifiedBy {
            get {
                return GetAttributeValue<EntityReference>("modifiedby");
            }
        }
        
        /// <summary>
        /// <para>Date and time when the user was last modified.</para>
        /// <para>Display Name: Modified On</para>
        /// </summary>
        [AttributeLogicalName("modifiedon")]
        public DateTime? ModifiedOn {
            get {
                return GetAttributeValue<DateTime?>("modifiedon");
            }
        }
        
        /// <summary>
        /// <para>Unique identifier of the delegate user who last modified the systemuser.</para>
        /// <para>Display Name: Modified By (Delegate)</para>
        /// </summary>
        [AttributeLogicalName("modifiedonbehalfby")]
        public EntityReference ModifiedOnBehalfBy {
            get {
                return GetAttributeValue<EntityReference>("modifiedonbehalfby");
            }
        }
        
        /// <summary>
        /// <para>Nickname of the user.</para>
        /// <para>Display Name: Nickname</para>
        /// </summary>
        [AttributeLogicalName("nickname")]
        public string NickName {
            get {
                return GetAttributeValue<string>("nickname");
            }
            set {
                SetAttributeValue("nickname", value);
            }
        }
        
        /// <summary>
        /// <para>Unique identifier of the organization associated with the user.</para>
        /// <para>Display Name: Organization </para>
        /// </summary>
        [AttributeLogicalName("organizationid")]
        public Guid? OrganizationId {
            get {
                return GetAttributeValue<Guid?>("organizationid");
            }
        }
        
        /// <summary>
        /// <para>Outgoing email delivery method for the user.</para>
        /// <para>Display Name: Outgoing Email Delivery Method</para>
        /// </summary>
        [AttributeLogicalName("outgoingemaildeliverymethod")]
        public SystemUser_OutgoingEmailDeliveryMethod? OutgoingEmailDeliveryMethod {
            get {
                return GetOptionSetValue<SystemUser_OutgoingEmailDeliveryMethod>("outgoingemaildeliverymethod");
            }
            set {
                SetOptionSetValue("outgoingemaildeliverymethod", value);
            }
        }
        
        /// <summary>
        /// <para>Date and time that the record was migrated.</para>
        /// <para>Display Name: Record Created On</para>
        /// </summary>
        [AttributeLogicalName("overriddencreatedon")]
        public DateTime? OverriddenCreatedOn {
            get {
                return GetAttributeValue<DateTime?>("overriddencreatedon");
            }
            set {
                SetAttributeValue("overriddencreatedon", value);
            }
        }
        
        /// <summary>
        /// <para>Unique identifier of the manager of the user.</para>
        /// <para>Display Name: Manager</para>
        /// </summary>
        [AttributeLogicalName("parentsystemuserid")]
        public EntityReference ParentSystemUserId {
            get {
                return GetAttributeValue<EntityReference>("parentsystemuserid");
            }
            set {
                SetAttributeValue("parentsystemuserid", value);
            }
        }
        
        /// <summary>
        /// <para>For internal use only.</para>
        /// <para>Display Name: Passport Hi</para>
        /// </summary>
        [AttributeLogicalName("passporthi")]
        public int? PassportHi {
            get {
                return GetAttributeValue<int?>("passporthi");
            }
            set {
                SetAttributeValue("passporthi", value);
            }
        }
        
        /// <summary>
        /// <para>For internal use only.</para>
        /// <para>Display Name: Passport Lo</para>
        /// </summary>
        [AttributeLogicalName("passportlo")]
        public int? PassportLo {
            get {
                return GetAttributeValue<int?>("passportlo");
            }
            set {
                SetAttributeValue("passportlo", value);
            }
        }
        
        /// <summary>
        /// <para>Personal email address of the user.</para>
        /// <para>Display Name: Email 2</para>
        /// </summary>
        [AttributeLogicalName("personalemailaddress")]
        public string PersonalEMailAddress {
            get {
                return GetAttributeValue<string>("personalemailaddress");
            }
            set {
                SetAttributeValue("personalemailaddress", value);
            }
        }
        
        /// <summary>
        /// <para>URL for the Website on which a photo of the user is located.</para>
        /// <para>Display Name: Photo URL</para>
        /// </summary>
        [AttributeLogicalName("photourl")]
        public string PhotoUrl {
            get {
                return GetAttributeValue<string>("photourl");
            }
            set {
                SetAttributeValue("photourl", value);
            }
        }
        
        /// <summary>
        /// <para>User's position in hierarchical security model.</para>
        /// <para>Display Name: Position</para>
        /// </summary>
        [AttributeLogicalName("positionid")]
        public EntityReference PositionId {
            get {
                return GetAttributeValue<EntityReference>("positionid");
            }
            set {
                SetAttributeValue("positionid", value);
            }
        }
        
        /// <summary>
        /// <para>Preferred address for the user.</para>
        /// <para>Display Name: Preferred Address</para>
        /// </summary>
        [AttributeLogicalName("preferredaddresscode")]
        public SystemUser_PreferredAddressCode? PreferredAddressCode {
            get {
                return GetOptionSetValue<SystemUser_PreferredAddressCode>("preferredaddresscode");
            }
            set {
                SetOptionSetValue("preferredaddresscode", value);
            }
        }
        
        /// <summary>
        /// <para>Preferred email address for the user.</para>
        /// <para>Display Name: Preferred Email</para>
        /// </summary>
        [AttributeLogicalName("preferredemailcode")]
        public SystemUser_PreferredEmailCode? PreferredEmailCode {
            get {
                return GetOptionSetValue<SystemUser_PreferredEmailCode>("preferredemailcode");
            }
            set {
                SetOptionSetValue("preferredemailcode", value);
            }
        }
        
        /// <summary>
        /// <para>Preferred phone number for the user.</para>
        /// <para>Display Name: Preferred Phone</para>
        /// </summary>
        [AttributeLogicalName("preferredphonecode")]
        public SystemUser_PreferredPhoneCode? PreferredPhoneCode {
            get {
                return GetOptionSetValue<SystemUser_PreferredPhoneCode>("preferredphonecode");
            }
            set {
                SetOptionSetValue("preferredphonecode", value);
            }
        }
        
        /// <summary>
        /// <para>Shows the ID of the process.</para>
        /// <para>Display Name: Process</para>
        /// </summary>
        [AttributeLogicalName("processid")]
        public Guid? ProcessId {
            get {
                return GetAttributeValue<Guid?>("processid");
            }
            set {
                SetAttributeValue("processid", value);
            }
        }
        
        /// <summary>
        /// <para>Unique identifier of the default queue for the user.</para>
        /// <para>Display Name: Default Queue</para>
        /// </summary>
        [AttributeLogicalName("queueid")]
        public EntityReference QueueId {
            get {
                return GetAttributeValue<EntityReference>("queueid");
            }
            set {
                SetAttributeValue("queueid", value);
            }
        }
        
        /// <summary>
        /// <para>Salutation for correspondence with the user.</para>
        /// <para>Display Name: Salutation</para>
        /// </summary>
        [AttributeLogicalName("salutation")]
        public string Salutation {
            get {
                return GetAttributeValue<string>("salutation");
            }
            set {
                SetAttributeValue("salutation", value);
            }
        }
        
        /// <summary>
        /// <para>Check if user is a setup user.</para>
        /// <para>Display Name: Restricted Access Mode</para>
        /// </summary>
        [AttributeLogicalName("setupuser")]
        public bool? SetupUser {
            get {
                return GetAttributeValue<bool?>("setupuser");
            }
            set {
                SetAttributeValue("setupuser", value);
            }
        }
        
        /// <summary>
        /// <para>SharePoint Work Email Address</para>
        /// <para>Display Name: SharePoint Email Address</para>
        /// </summary>
        [AttributeLogicalName("sharepointemailaddress")]
        public string SharePointEmailAddress {
            get {
                return GetAttributeValue<string>("sharepointemailaddress");
            }
            set {
                SetAttributeValue("sharepointemailaddress", value);
            }
        }
        
        /// <summary>
        /// <para>Skill set of the user.</para>
        /// <para>Display Name: Skills</para>
        /// </summary>
        [AttributeLogicalName("skills")]
        public string Skills {
            get {
                return GetAttributeValue<string>("skills");
            }
            set {
                SetAttributeValue("skills", value);
            }
        }
        
        /// <summary>
        /// <para>Shows the ID of the stage.</para>
        /// <para>Display Name: (Deprecated) Process Stage</para>
        /// </summary>
        [AttributeLogicalName("stageid")]
        public Guid? StageId {
            get {
                return GetAttributeValue<Guid?>("stageid");
            }
            set {
                SetAttributeValue("stageid", value);
            }
        }
        
        /// <summary>
        /// <para>Unique identifier of the territory to which the user is assigned.</para>
        /// <para>Display Name: Territory</para>
        /// </summary>
        [AttributeLogicalName("territoryid")]
        public EntityReference TerritoryId {
            get {
                return GetAttributeValue<EntityReference>("territoryid");
            }
            set {
                SetAttributeValue("territoryid", value);
            }
        }
        
        /// <summary>
        /// <para>For internal use only.</para>
        /// <para>Display Name: Time Zone Rule Version Number</para>
        /// </summary>
        [AttributeLogicalName("timezoneruleversionnumber")]
        public int? TimeZoneRuleVersionNumber {
            get {
                return GetAttributeValue<int?>("timezoneruleversionnumber");
            }
            set {
                SetAttributeValue("timezoneruleversionnumber", value);
            }
        }
        
        /// <summary>
        /// <para>Title of the user.</para>
        /// <para>Display Name: Title</para>
        /// </summary>
        [AttributeLogicalName("title")]
        public string Title {
            get {
                return GetAttributeValue<string>("title");
            }
            set {
                SetAttributeValue("title", value);
            }
        }
        
        /// <summary>
        /// <para>Unique identifier of the currency associated with the systemuser.</para>
        /// <para>Display Name: Currency</para>
        /// </summary>
        [AttributeLogicalName("transactioncurrencyid")]
        public EntityReference TransactionCurrencyId {
            get {
                return GetAttributeValue<EntityReference>("transactioncurrencyid");
            }
            set {
                SetAttributeValue("transactioncurrencyid", value);
            }
        }
        
        /// <summary>
        /// <para>For internal use only.</para>
        /// <para>Display Name: (Deprecated) Traversed Path</para>
        /// </summary>
        [AttributeLogicalName("traversedpath")]
        public string TraversedPath {
            get {
                return GetAttributeValue<string>("traversedpath");
            }
            set {
                SetAttributeValue("traversedpath", value);
            }
        }
        
        /// <summary>
        /// <para>Time zone code that was in use when the record was created.</para>
        /// <para>Display Name: UTC Conversion Time Zone Code</para>
        /// </summary>
        [AttributeLogicalName("utcconversiontimezonecode")]
        public int? UTCConversionTimeZoneCode {
            get {
                return GetAttributeValue<int?>("utcconversiontimezonecode");
            }
            set {
                SetAttributeValue("utcconversiontimezonecode", value);
            }
        }
        
        /// <summary>
        /// <para>Shows the type of user license.</para>
        /// <para>Display Name: User License Type</para>
        /// </summary>
        [AttributeLogicalName("userlicensetype")]
        public int? UserLicenseType {
            get {
                return GetAttributeValue<int?>("userlicensetype");
            }
            set {
                SetAttributeValue("userlicensetype", value);
            }
        }
        
        /// <summary>
        /// <para> User PUID User Identifiable Information</para>
        /// <para>Display Name: User PUID</para>
        /// </summary>
        [AttributeLogicalName("userpuid")]
        public string UserPuid {
            get {
                return GetAttributeValue<string>("userpuid");
            }
        }
        
        /// <summary>
        /// <para>Version number of the user.</para>
        /// <para>Display Name: Version number</para>
        /// </summary>
        [AttributeLogicalName("versionnumber")]
        public long? VersionNumber {
            get {
                return GetAttributeValue<long?>("versionnumber");
            }
        }
        
        /// <summary>
        /// <para>Windows Live ID</para>
        /// <para>Display Name: Windows Live ID</para>
        /// </summary>
        [AttributeLogicalName("windowsliveid")]
        public string WindowsLiveID {
            get {
                return GetAttributeValue<string>("windowsliveid");
            }
            set {
                SetAttributeValue("windowsliveid", value);
            }
        }
        
        /// <summary>
        /// <para>User's Yammer login email address</para>
        /// <para>Display Name: Yammer Email</para>
        /// </summary>
        [AttributeLogicalName("yammeremailaddress")]
        public string YammerEmailAddress {
            get {
                return GetAttributeValue<string>("yammeremailaddress");
            }
            set {
                SetAttributeValue("yammeremailaddress", value);
            }
        }
        
        /// <summary>
        /// <para>User's Yammer ID</para>
        /// <para>Display Name: Yammer User ID</para>
        /// </summary>
        [AttributeLogicalName("yammeruserid")]
        public string YammerUserId {
            get {
                return GetAttributeValue<string>("yammeruserid");
            }
            set {
                SetAttributeValue("yammeruserid", value);
            }
        }
        
        /// <summary>
        /// <para>Pronunciation of the first name of the user, written in phonetic hiragana or katakana characters.</para>
        /// <para>Display Name: Yomi First Name</para>
        /// </summary>
        [AttributeLogicalName("yomifirstname")]
        public string YomiFirstName {
            get {
                return GetAttributeValue<string>("yomifirstname");
            }
            set {
                SetAttributeValue("yomifirstname", value);
            }
        }
        
        /// <summary>
        /// <para>Pronunciation of the full name of the user, written in phonetic hiragana or katakana characters.</para>
        /// <para>Display Name: Yomi Full Name</para>
        /// </summary>
        [AttributeLogicalName("yomifullname")]
        public string YomiFullName {
            get {
                return GetAttributeValue<string>("yomifullname");
            }
        }
        
        /// <summary>
        /// <para>Pronunciation of the last name of the user, written in phonetic hiragana or katakana characters.</para>
        /// <para>Display Name: Yomi Last Name</para>
        /// </summary>
        [AttributeLogicalName("yomilastname")]
        public string YomiLastName {
            get {
                return GetAttributeValue<string>("yomilastname");
            }
            set {
                SetAttributeValue("yomilastname", value);
            }
        }
        
        /// <summary>
        /// <para>Pronunciation of the middle name of the user, written in phonetic hiragana or katakana characters.</para>
        /// <para>Display Name: Yomi Middle Name</para>
        /// </summary>
        [AttributeLogicalName("yomimiddlename")]
        public string YomiMiddleName {
            get {
                return GetAttributeValue<string>("yomimiddlename");
            }
            set {
                SetAttributeValue("yomimiddlename", value);
            }
        }
        
        [RelationshipSchemaName("lk_systemuser_createdonbehalfby", EntityRole.Referenced)]
        public IEnumerable<SystemUser> Referencedlk_systemuser_createdonbehalfby {
            get {
                return GetRelatedEntities<SystemUser>("lk_systemuser_createdonbehalfby", EntityRole.Referenced);
            }
            set {
                SetRelatedEntities("lk_systemuser_createdonbehalfby", EntityRole.Referenced, value);
            }
        }
        
        [RelationshipSchemaName("lk_systemuser_modifiedonbehalfby", EntityRole.Referenced)]
        public IEnumerable<SystemUser> Referencedlk_systemuser_modifiedonbehalfby {
            get {
                return GetRelatedEntities<SystemUser>("lk_systemuser_modifiedonbehalfby", EntityRole.Referenced);
            }
            set {
                SetRelatedEntities("lk_systemuser_modifiedonbehalfby", EntityRole.Referenced, value);
            }
        }
        
        [RelationshipSchemaName("lk_systemuserbase_createdby", EntityRole.Referenced)]
        public IEnumerable<SystemUser> Referencedlk_systemuserbase_createdby {
            get {
                return GetRelatedEntities<SystemUser>("lk_systemuserbase_createdby", EntityRole.Referenced);
            }
            set {
                SetRelatedEntities("lk_systemuserbase_createdby", EntityRole.Referenced, value);
            }
        }
        
        [RelationshipSchemaName("lk_systemuserbase_modifiedby", EntityRole.Referenced)]
        public IEnumerable<SystemUser> Referencedlk_systemuserbase_modifiedby {
            get {
                return GetRelatedEntities<SystemUser>("lk_systemuserbase_modifiedby", EntityRole.Referenced);
            }
            set {
                SetRelatedEntities("lk_systemuserbase_modifiedby", EntityRole.Referenced, value);
            }
        }
        
        [RelationshipSchemaName("user_parent_user", EntityRole.Referenced)]
        public IEnumerable<SystemUser> Referenceduser_parent_user {
            get {
                return GetRelatedEntities<SystemUser>("user_parent_user", EntityRole.Referenced);
            }
            set {
                SetRelatedEntities("user_parent_user", EntityRole.Referenced, value);
            }
        }
        
        [AttributeLogicalName("createdonbehalfby")]
        [RelationshipSchemaName("lk_systemuser_createdonbehalfby", EntityRole.Referencing)]
        public SystemUser Referencinglk_systemuser_createdonbehalfby {
            get {
                return GetRelatedEntity<SystemUser>("lk_systemuser_createdonbehalfby", EntityRole.Referencing);
            }
            set {
                SetRelatedEntity("lk_systemuser_createdonbehalfby", EntityRole.Referencing, value);
            }
        }
        
        [AttributeLogicalName("modifiedonbehalfby")]
        [RelationshipSchemaName("lk_systemuser_modifiedonbehalfby", EntityRole.Referencing)]
        public SystemUser Referencinglk_systemuser_modifiedonbehalfby {
            get {
                return GetRelatedEntity<SystemUser>("lk_systemuser_modifiedonbehalfby", EntityRole.Referencing);
            }
            set {
                SetRelatedEntity("lk_systemuser_modifiedonbehalfby", EntityRole.Referencing, value);
            }
        }
        
        [AttributeLogicalName("createdby")]
        [RelationshipSchemaName("lk_systemuserbase_createdby", EntityRole.Referencing)]
        public SystemUser Referencinglk_systemuserbase_createdby {
            get {
                return GetRelatedEntity<SystemUser>("lk_systemuserbase_createdby", EntityRole.Referencing);
            }
            set {
                SetRelatedEntity("lk_systemuserbase_createdby", EntityRole.Referencing, value);
            }
        }
        
        [AttributeLogicalName("modifiedby")]
        [RelationshipSchemaName("lk_systemuserbase_modifiedby", EntityRole.Referencing)]
        public SystemUser Referencinglk_systemuserbase_modifiedby {
            get {
                return GetRelatedEntity<SystemUser>("lk_systemuserbase_modifiedby", EntityRole.Referencing);
            }
            set {
                SetRelatedEntity("lk_systemuserbase_modifiedby", EntityRole.Referencing, value);
            }
        }
        
        [AttributeLogicalName("parentsystemuserid")]
        [RelationshipSchemaName("user_parent_user", EntityRole.Referencing)]
        public SystemUser Referencinguser_parent_user {
            get {
                return GetRelatedEntity<SystemUser>("user_parent_user", EntityRole.Referencing);
            }
            set {
                SetRelatedEntity("user_parent_user", EntityRole.Referencing, value);
            }
        }
        
        [AttributeLogicalName("businessunitid")]
        [RelationshipSchemaName("business_unit_system_users")]
        public BusinessUnit business_unit_system_users {
            get {
                return GetRelatedEntity<BusinessUnit>("business_unit_system_users", null);
            }
            set {
                SetRelatedEntity("business_unit_system_users", null, value);
            }
        }
        
        [RelationshipSchemaName("lk_businessunit_createdonbehalfby")]
        public IEnumerable<BusinessUnit> lk_businessunit_createdonbehalfby {
            get {
                return GetRelatedEntities<BusinessUnit>("lk_businessunit_createdonbehalfby", null);
            }
            set {
                SetRelatedEntities("lk_businessunit_createdonbehalfby", null, value);
            }
        }
        
        [RelationshipSchemaName("lk_businessunit_modifiedonbehalfby")]
        public IEnumerable<BusinessUnit> lk_businessunit_modifiedonbehalfby {
            get {
                return GetRelatedEntities<BusinessUnit>("lk_businessunit_modifiedonbehalfby", null);
            }
            set {
                SetRelatedEntities("lk_businessunit_modifiedonbehalfby", null, value);
            }
        }
        
        [RelationshipSchemaName("lk_businessunitbase_createdby")]
        public IEnumerable<BusinessUnit> lk_businessunitbase_createdby {
            get {
                return GetRelatedEntities<BusinessUnit>("lk_businessunitbase_createdby", null);
            }
            set {
                SetRelatedEntities("lk_businessunitbase_createdby", null, value);
            }
        }
        
        [RelationshipSchemaName("lk_businessunitbase_modifiedby")]
        public IEnumerable<BusinessUnit> lk_businessunitbase_modifiedby {
            get {
                return GetRelatedEntities<BusinessUnit>("lk_businessunitbase_modifiedby", null);
            }
            set {
                SetRelatedEntities("lk_businessunitbase_modifiedby", null, value);
            }
        }
        
        [RelationshipSchemaName("lk_team_createdonbehalfby")]
        public IEnumerable<Team> lk_team_createdonbehalfby {
            get {
                return GetRelatedEntities<Team>("lk_team_createdonbehalfby", null);
            }
            set {
                SetRelatedEntities("lk_team_createdonbehalfby", null, value);
            }
        }
        
        [RelationshipSchemaName("lk_team_modifiedonbehalfby")]
        public IEnumerable<Team> lk_team_modifiedonbehalfby {
            get {
                return GetRelatedEntities<Team>("lk_team_modifiedonbehalfby", null);
            }
            set {
                SetRelatedEntities("lk_team_modifiedonbehalfby", null, value);
            }
        }
        
        [RelationshipSchemaName("lk_teambase_administratorid")]
        public IEnumerable<Team> lk_teambase_administratorid {
            get {
                return GetRelatedEntities<Team>("lk_teambase_administratorid", null);
            }
            set {
                SetRelatedEntities("lk_teambase_administratorid", null, value);
            }
        }
        
        [RelationshipSchemaName("lk_teambase_createdby")]
        public IEnumerable<Team> lk_teambase_createdby {
            get {
                return GetRelatedEntities<Team>("lk_teambase_createdby", null);
            }
            set {
                SetRelatedEntities("lk_teambase_createdby", null, value);
            }
        }
        
        [RelationshipSchemaName("lk_teambase_modifiedby")]
        public IEnumerable<Team> lk_teambase_modifiedby {
            get {
                return GetRelatedEntities<Team>("lk_teambase_modifiedby", null);
            }
            set {
                SetRelatedEntities("lk_teambase_modifiedby", null, value);
            }
        }
        
        [RelationshipSchemaName("teammembership_association")]
        public IEnumerable<Team> teammembership_association {
            get {
                return GetRelatedEntities<Team>("teammembership_association", null);
            }
            set {
                SetRelatedEntities("teammembership_association", null, value);
            }
        }
        
        public static SystemUser Retrieve(IOrganizationService service, Guid id, params Expression<Func<SystemUser,object>>[] attrs) {
            return service.Retrieve(id, attrs);
        }
    }
    
    [DataContract()]
    public enum SystemUser_Address2_ShippingMethodCode {
        
        [EnumMember()]
        DefaultValue = 1,
    }
    
    [DataContract()]
    public enum SystemUser_AccessMode {
        
        [EnumMember()]
        ReadWrite = 0,
        
        [EnumMember()]
        Administrative = 1,
        
        [EnumMember()]
        Read = 2,
        
        [EnumMember()]
        SupportUser = 3,
        
        [EnumMember()]
        Noninteractive = 4,
        
        [EnumMember()]
        DelegatedAdmin = 5,
    }
    
    [DataContract()]
    public enum SystemUser_Address1_ShippingMethodCode {
        
        [EnumMember()]
        DefaultValue = 1,
    }
    
    [DataContract()]
    public enum SystemUser_PreferredAddressCode {
        
        [EnumMember()]
        MailingAddress = 1,
        
        [EnumMember()]
        OtherAddress = 2,
    }
    
    [DataContract()]
    public enum SystemUser_PreferredEmailCode {
        
        [EnumMember()]
        DefaultValue = 1,
    }
    
    [DataContract()]
    public enum SystemUser_CALType {
        
        [EnumMember()]
        Professional = 0,
        
        [EnumMember()]
        Administrative = 1,
        
        [EnumMember()]
        Basic = 2,
        
        [EnumMember()]
        DeviceProfessional = 3,
        
        [EnumMember()]
        DeviceBasic = 4,
        
        [EnumMember()]
        Essential = 5,
        
        [EnumMember()]
        DeviceEssential = 6,
        
        [EnumMember()]
        Enterprise = 7,
        
        [EnumMember()]
        DeviceEnterprise = 8,
        
        [EnumMember()]
        Sales = 9,
        
        [EnumMember()]
        Service = 10,
        
        [EnumMember()]
        FieldService = 11,
        
        [EnumMember()]
        ProjectService = 12,
    }
    
    [DataContract()]
    public enum SystemUser_Address1_AddressTypeCode {
        
        [EnumMember()]
        DefaultValue = 1,
    }
    
    [DataContract()]
    public enum SystemUser_IncomingEmailDeliveryMethod {
        
        [EnumMember()]
        None = 0,
        
        [EnumMember()]
        MicrosoftDynamics365forOutlook = 1,
        
        [EnumMember()]
        ServerSideSynchronizationorEmailRouter = 2,
        
        [EnumMember()]
        ForwardMailbox = 3,
    }
    
    [DataContract()]
    public enum SystemUser_PreferredPhoneCode {
        
        [EnumMember()]
        MainPhone = 1,
        
        [EnumMember()]
        OtherPhone = 2,
        
        [EnumMember()]
        HomePhone = 3,
        
        [EnumMember()]
        MobilePhone = 4,
    }
    
    [DataContract()]
    public enum SystemUser_OutgoingEmailDeliveryMethod {
        
        [EnumMember()]
        None = 0,
        
        [EnumMember()]
        MicrosoftDynamics365forOutlook = 1,
        
        [EnumMember()]
        ServerSideSynchronizationorEmailRouter = 2,
    }
    
    [DataContract()]
    public enum SystemUser_InviteStatusCode {
        
        [EnumMember()]
        InvitationNotSent = 0,
        
        [EnumMember()]
        Invited = 1,
        
        [EnumMember()]
        InvitationNearExpired = 2,
        
        [EnumMember()]
        InvitationExpired = 3,
        
        [EnumMember()]
        InvitationAccepted = 4,
        
        [EnumMember()]
        InvitationRejected = 5,
        
        [EnumMember()]
        InvitationRevoked = 6,
    }
    
    [DataContract()]
    public enum SystemUser_EmailRouterAccessApproval {
        
        [EnumMember()]
        Empty = 0,
        
        [EnumMember()]
        Approved = 1,
        
        [EnumMember()]
        PendingApproval = 2,
        
        [EnumMember()]
        Rejected = 3,
    }
    
    [DataContract()]
    public enum SystemUser_Address2_AddressTypeCode {
        
        [EnumMember()]
        DefaultValue = 1,
    }
}