//Describes the device type

public enum DeviceType

    {

        Pc, AndroidTablet, AndroidPhone, Iphone, Ipad, IpadMine, WindowsPhone, WindowsTablet,

        Unknown, WebClient, Mac, IpadMini

    }

//Indicate the users status

public enum Validated

    {

        NotValidated, PasswordExpired, PasswordMustChange, ConnectionProblem, Validated

    }

 

 A user can be connected to multiple domains (an example could be a user that is connected to rushfiles.net and prod.rushfiles.com)

 public class GlobalLoginResponce

    {

        public UserDomain PrimaryUserDomain; //This is the users primary domian

        public bool Wipe; //Should the device be wiped

        public string ErrorCode; //Indicates if the request was successful (U100)

        public Validated Validated; //Indicate the users status

        public User User; //The user object (see the user class)

        public Reseller Reseller; // This is the primary reseller of the user

    }

 

 public class Reseller

 {

        public string ResellerId { get; set; }//Cannot be set

        public string ExternalId { get; set; } //Can be set to a unique Id so it can be easily found.

        public string ExternalPassword { get; set; } //Cannot be set

        public string ParrentResellerId { get; set; } //On create this has to be set (to the same resellerId as in the CreateResellerRequest).

         //Set to the domain of the reseller (If running on your server, it should be your domain and a sub domain has to be set).

        public string ProviderId { get; set; }

        public string Name { get; set; } //The name of the reseller and it has to be unique.

        //Optional

        public string ClientUrlPc { get; set; } //Link to download the pc client.

        public string ClientUrlMac { get; set; } //Link to download the mac client.

        public string ClientUrlIos { get; set; } //Link to downlaod the iOs app.

        public string ClientUrlAndroid { get; set; } //Link to download the Android app.

        public string ClientUrlWp { get; set; } // Link to download the Windows Phone app.

        public MetaData MetaData { get; set; } //Class containing address and contact information (Look further down for definition of the class).

        //Class containing history criterias for file versions(Look further down for definition of the class).

        public HistoryCriterias HistoryCriterias { get; set; } 

        public string Subdomain { get; set; } //Sub domian used if resellers is running on your domain has to be unique.

 }

 public class User

 {

       public string UserId { get; set; } //(Cannot be set) Unique Id of the user, is automatically set to the value in Email on create

       public string Email { get; set; } //Email address of the user

       public string Alias { get; set; } //(Cannot be set) alias used for AD login

       public string ResellerId { get; set; } //(Cannot be set) ResellerId of the reseller where the user is first created

       public UserStatus Status { get; set; } //(Cannot be set) the status of the user (Look further down for definition of the Enum)

       public bool AdUser { get; set; } //(Cannot be set) indicates if this user has been AD integrated

       //Optionals

       public string AltEmail { get; set; } //Alternative email for the user

       public string Name { get; set; } //If not set, it will automatically be set to Email field on create

       public string Company { get; set; } //Name of the company where user works/belongs

       public string Title { get; set; } //Title of the user

       public string Telephone { get; set; } //Phone number of the user

    }

 public class UserDefault

 {      //Determins if the user can create shares (External users are never allowed to create shares).

        public UserCrtShare UserCrtShare { get; set; } 

        public CrtPrivateShare CrtPrivateShare {get;set;} //Determins if there should be created a private share for the user.

        public int PrivateShareMax { get; set; } //Soft limit max size of the private share, is in GB's

 }

 public enum UserStatus

 {

        Unconfirmed, //0

        Deleted, //1

        Actived, //2

        Deactived //3

 }

 public enum UserCrtShare

 {

        Allowed, //0

        NotAllowed //1

 }

 public enum CrtPrivateShare

 {

        Yes, //0

        No //1

 }

 

 public class ManagedShare

    {

        public AssociationType AssociationType; //See AssociationType

        public string VshareId; //Vshare id

        public string ShareId; //Id od the share

        public string ShareName; //Name of share

        public int LastApplyedJournalTick; //this is the last tick applyed if this is higher than the tick you have it means that the share was updated.

        public string AliasName; //Used for local rename

        public ShareACL ShareAcl; //See ShareACL

        public string CompanyName; //Name of the comapany

        public string CompanyId; //The id of the company that the share is on

        public string Owner; //This is the owner of the share

     

    }

 //contain information

 public class ShareACL

    {

        public string ShareId; //Id of the share

        public ACLType AclType; //See ACLType

        public string AclToken; // token that you need for file operation.

        public string ByUserId; // This is the id of the user that have assigned you to the share

 }

 

    public enum ACLType

    {

        Read, The user is assigned with read

  Modify, The user can read and write

  Owner , The user is a owner and can read and write.

    }

   

 

 //Is the companies that the user is connected to

 public class SharingCompany

    {

        public string CompanyId { get; set; } //Id of the company

        public string CompanyName { get; set; } //Name of the company

        public CompanyDefault CompanyDefault { get; set; } //See CompanyDefault

        public AssociationType AssociationType { get; set; } //See AssociationType

    }

 

 //The company defaults settings

 public class CompanyDefault

    {

        public int UserShareMax { get; set; } //Max amount of gb that the user is allowed to use

        public UserCrtShare UserCrtShare { get; set; } //Is the user allowed to create shares

        public CrtPrivateShare CrtPrivateShare { get; set; }//When a users is created should the system create a private share for that user

        public string PrivateShareName { get; set; } //Default name of private share

        public int PrivateShareMax { get; set; }// Max size on private share

        public int PublicLinkExpireDefault { get; set; } // Default expire date on public links

        public bool EnforceDefault { get; set; } // Should Default be enforced

    }

 

 public enum UserCrtShare

    {

        Allowed, //0

        NotAllowed //1

    }

    public enum CrtPrivateShare

    {

        Yes, //0

        No //1

    }

 

 //Type of user

    public enum AssociationType

    {

        Extrenal, Internal, Admin

    }


public class UserDomain

    {

        public Domain Domain;

        public string UserDomainToken;

    }


public class Domain

    {

        public string Url { get; set; }

        public string DomainName { get; set; }

    }


    public enum DomainDataSetup

    {

        Shared, DataIsland

    }