示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="User" /> class.
 /// </summary>
 /// <param name="Id">Id.</param>
 /// <param name="OwnerId">OwnerId.</param>
 /// <param name="Firstname">Firstname.</param>
 /// <param name="Lastname">Lastname.</param>
 /// <param name="Username">Username (required).</param>
 /// <param name="Email">Email (required).</param>
 /// <param name="Phone">Phone.</param>
 /// <param name="Created">Created.</param>
 /// <param name="LastUpdated">LastUpdated.</param>
 /// <param name="Preferences">Preferences.</param>
 /// <param name="TFAEnabled">TFAEnabled.</param>
 /// <param name="AffiliateID">AffiliateID.</param>
 /// <param name="PgpPubKey">PgpPubKey.</param>
 /// <param name="Country">Country.</param>
 public User(decimal?Id = null, decimal?OwnerId = null, string Firstname = null, string Lastname = null, string Username = null, string Email = null, string Phone = null, DateTime?Created = null, DateTime?LastUpdated = null, UserPreferences Preferences = null, string TFAEnabled = null, string AffiliateID = null, string PgpPubKey = null, string Country = null)
 {
     // to ensure "Username" is required (not null)
     if (Username == null)
     {
         throw new InvalidDataException("Username is a required property for User and cannot be null");
     }
     else
     {
         this.Username = Username;
     }
     // to ensure "Email" is required (not null)
     if (Email == null)
     {
         throw new InvalidDataException("Email is a required property for User and cannot be null");
     }
     else
     {
         this.Email = Email;
     }
     this.Id          = Id;
     this.OwnerId     = OwnerId;
     this.Firstname   = Firstname;
     this.Lastname    = Lastname;
     this.Phone       = Phone;
     this.Created     = Created;
     this.LastUpdated = LastUpdated;
     this.Preferences = Preferences;
     this.TFAEnabled  = TFAEnabled;
     this.AffiliateID = AffiliateID;
     this.PgpPubKey   = PgpPubKey;
     this.Country     = Country;
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="User" /> class.
 /// </summary>
 /// <param name="id">id.</param>
 /// <param name="ownerId">ownerId.</param>
 /// <param name="firstname">firstname.</param>
 /// <param name="lastname">lastname.</param>
 /// <param name="username">username (required).</param>
 /// <param name="email">email (required).</param>
 /// <param name="phone">phone.</param>
 /// <param name="created">created.</param>
 /// <param name="lastUpdated">lastUpdated.</param>
 /// <param name="preferences">preferences.</param>
 /// <param name="tFAEnabled">tFAEnabled.</param>
 /// <param name="affiliateID">affiliateID.</param>
 /// <param name="pgpPubKey">pgpPubKey.</param>
 /// <param name="country">country.</param>
 /// <param name="typ">typ.</param>
 public User(decimal?id = default(decimal?), decimal?ownerId = default(decimal?), string firstname = default(string), string lastname = default(string), string username = default(string), string email = default(string), string phone = default(string), DateTime?created = default(DateTime?), DateTime?lastUpdated = default(DateTime?), UserPreferences preferences = default(UserPreferences), string tFAEnabled = default(string), string affiliateID = default(string), string pgpPubKey = default(string), string country = default(string), string typ = default(string))
 {
     // to ensure "username" is required (not null)
     if (username == null)
     {
         throw new InvalidDataException("username is a required property for User and cannot be null");
     }
     else
     {
         this.Username = username;
     }
     // to ensure "email" is required (not null)
     if (email == null)
     {
         throw new InvalidDataException("email is a required property for User and cannot be null");
     }
     else
     {
         this.Email = email;
     }
     this.Id          = id;
     this.OwnerId     = ownerId;
     this.Firstname   = firstname;
     this.Lastname    = lastname;
     this.Phone       = phone;
     this.Created     = created;
     this.LastUpdated = lastUpdated;
     this.Preferences = preferences;
     this.TFAEnabled  = tFAEnabled;
     this.AffiliateID = affiliateID;
     this.PgpPubKey   = pgpPubKey;
     this.Country     = country;
     this.Typ         = typ;
 }