Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UserDetail" /> class.
 /// </summary>
 /// <param name="Licence">Licence details for the user (required).</param>
 /// <param name="Id">The user&#39;s id (required).</param>
 /// <param name="Username">The user&#39;s username (required).</param>
 /// <param name="Firstname">The user&#39;s first name (required).</param>
 /// <param name="Surname">The user&#39;s surname (required).</param>
 /// <param name="EmailAddress">The user&#39;s email address (required).</param>
 /// <param name="UserDisabledDate">The date on which the user was or will become disabled,  or null if the user has not been disabled (required).</param>
 public UserDetail(Licence Licence = default(Licence), int?Id = default(int?), string Username = default(string), string Firstname = default(string), string Surname = default(string), string EmailAddress = default(string), DateTime?UserDisabledDate = default(DateTime?))
 {
     // to ensure "Licence" is required (not null)
     if (Licence == null)
     {
         throw new InvalidDataException("Licence is a required property for UserDetail and cannot be null");
     }
     else
     {
         this.Licence = Licence;
     }
     // to ensure "Id" is required (not null)
     if (Id == null)
     {
         throw new InvalidDataException("Id is a required property for UserDetail and cannot be null");
     }
     else
     {
         this.Id = Id;
     }
     // to ensure "Username" is required (not null)
     if (Username == null)
     {
         throw new InvalidDataException("Username is a required property for UserDetail and cannot be null");
     }
     else
     {
         this.Username = Username;
     }
     // to ensure "Firstname" is required (not null)
     if (Firstname == null)
     {
         throw new InvalidDataException("Firstname is a required property for UserDetail and cannot be null");
     }
     else
     {
         this.Firstname = Firstname;
     }
     // to ensure "Surname" is required (not null)
     if (Surname == null)
     {
         throw new InvalidDataException("Surname is a required property for UserDetail and cannot be null");
     }
     else
     {
         this.Surname = Surname;
     }
     // to ensure "EmailAddress" is required (not null)
     if (EmailAddress == null)
     {
         throw new InvalidDataException("EmailAddress is a required property for UserDetail and cannot be null");
     }
     else
     {
         this.EmailAddress = EmailAddress;
     }
     // to ensure "UserDisabledDate" is required (not null)
     if (UserDisabledDate == null)
     {
         throw new InvalidDataException("UserDisabledDate is a required property for UserDetail and cannot be null");
     }
     else
     {
         this.UserDisabledDate = UserDisabledDate;
     }
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SessionDetails" /> class.
 /// </summary>
 /// <param name="AccessToken">The access token that needs to be included when making requests that require authentication (required).</param>
 /// <param name="User">Details of the user associated with this current session (required).</param>
 /// <param name="SessionId">The id for this current session (required).</param>
 /// <param name="Licence">Licence details for the user associated with this current session (required).</param>
 public SessionDetails(string AccessToken = default(string), UserDisplayDetails User = default(UserDisplayDetails), string SessionId = default(string), Licence Licence = default(Licence))
 {
     // to ensure "AccessToken" is required (not null)
     if (AccessToken == null)
     {
         throw new InvalidDataException("AccessToken is a required property for SessionDetails and cannot be null");
     }
     else
     {
         this.AccessToken = AccessToken;
     }
     // to ensure "User" is required (not null)
     if (User == null)
     {
         throw new InvalidDataException("User is a required property for SessionDetails and cannot be null");
     }
     else
     {
         this.User = User;
     }
     // to ensure "SessionId" is required (not null)
     if (SessionId == null)
     {
         throw new InvalidDataException("SessionId is a required property for SessionDetails and cannot be null");
     }
     else
     {
         this.SessionId = SessionId;
     }
     // to ensure "Licence" is required (not null)
     if (Licence == null)
     {
         throw new InvalidDataException("Licence is a required property for SessionDetails and cannot be null");
     }
     else
     {
         this.Licence = Licence;
     }
 }