Beispiel #1
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>
 public SessionDetails(string AccessToken = default(string), UserDisplayDetails User = default(UserDisplayDetails), string SessionId = default(string))
 {
     // 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;
     }
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CollectionLabelDetail" /> class.
 /// </summary>
 /// <param name="Owner">The details of the user that created this label (required).</param>
 /// <param name="Id">The id of the label (required).</param>
 /// <param name="Description">The text for the label (required).</param>
 public CollectionLabelDetail(UserDisplayDetails Owner = default(UserDisplayDetails), int?Id = default(int?), string Description = default(string))
 {
     // to ensure "Owner" is required (not null)
     if (Owner == null)
     {
         throw new InvalidDataException("Owner is a required property for CollectionLabelDetail and cannot be null");
     }
     else
     {
         this.Owner = Owner;
     }
     // to ensure "Id" is required (not null)
     if (Id == null)
     {
         throw new InvalidDataException("Id is a required property for CollectionLabelDetail and cannot be null");
     }
     else
     {
         this.Id = Id;
     }
     // to ensure "Description" is required (not null)
     if (Description == null)
     {
         throw new InvalidDataException("Description is a required property for CollectionLabelDetail and cannot be null");
     }
     else
     {
         this.Description = Description;
     }
 }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CollectionHitDetail" /> class.
 /// </summary>
 /// <param name="UserAgentDetails">Details of the client application that made the view.</param>
 /// <param name="Id">The id of the hit itself (required).</param>
 /// <param name="CollectionId">The id of the collection viewed (required).</param>
 /// <param name="Timestamp">The timestamp of when the hit was recorded (required).</param>
 /// <param name="User">Details of the user that viewed the collection (required).</param>
 public CollectionHitDetail(string UserAgentDetails = default(string), int?Id = default(int?), int?CollectionId = default(int?), DateTime?Timestamp = default(DateTime?), UserDisplayDetails User = default(UserDisplayDetails))
 {
     // to ensure "Id" is required (not null)
     if (Id == null)
     {
         throw new InvalidDataException("Id is a required property for CollectionHitDetail and cannot be null");
     }
     else
     {
         this.Id = Id;
     }
     // to ensure "CollectionId" is required (not null)
     if (CollectionId == null)
     {
         throw new InvalidDataException("CollectionId is a required property for CollectionHitDetail and cannot be null");
     }
     else
     {
         this.CollectionId = CollectionId;
     }
     // to ensure "Timestamp" is required (not null)
     if (Timestamp == null)
     {
         throw new InvalidDataException("Timestamp is a required property for CollectionHitDetail and cannot be null");
     }
     else
     {
         this.Timestamp = Timestamp;
     }
     // to ensure "User" is required (not null)
     if (User == null)
     {
         throw new InvalidDataException("User is a required property for CollectionHitDetail and cannot be null");
     }
     else
     {
         this.User = User;
     }
     this.UserAgentDetails = UserAgentDetails;
 }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CollectionDetail" /> class.
 /// </summary>
 /// <param name="Id">The collection&#39;s id (required).</param>
 /// <param name="Owner">The details of the user that created this collection (required).</param>
 /// <param name="NumberOfParts">The number of parts within this collection.</param>
 /// <param name="NumberOfUsersSharedWith">The number of people this collection has been shared with (required).</param>
 /// <param name="CollectionShareId">The id of the share associated with this collection, or null if the  collection has not yet been shared (required).</param>
 /// <param name="NumberOfHits">The number of hits associated with this collection (required).</param>
 /// <param name="Title">The title of the collection (required).</param>
 /// <param name="Description">The description of the collection (required).</param>
 /// <param name="CreationDate">The date the collection was created (required).</param>
 /// <param name="FilePath">The path to the file that contains the parts of this collection (required).</param>
 /// <param name="DeletionDate">The date the collection was deleted, or null if it has not been deleted.</param>
 public CollectionDetail(int?Id = default(int?), UserDisplayDetails Owner = default(UserDisplayDetails), int?NumberOfParts = default(int?), int?NumberOfUsersSharedWith = default(int?), int?CollectionShareId = default(int?), int?NumberOfHits = default(int?), string Title = default(string), string Description = default(string), DateTime?CreationDate = default(DateTime?), string FilePath = default(string), DateTime?DeletionDate = default(DateTime?))
 {
     // to ensure "Id" is required (not null)
     if (Id == null)
     {
         throw new InvalidDataException("Id is a required property for CollectionDetail and cannot be null");
     }
     else
     {
         this.Id = Id;
     }
     // to ensure "Owner" is required (not null)
     if (Owner == null)
     {
         throw new InvalidDataException("Owner is a required property for CollectionDetail and cannot be null");
     }
     else
     {
         this.Owner = Owner;
     }
     // to ensure "NumberOfUsersSharedWith" is required (not null)
     if (NumberOfUsersSharedWith == null)
     {
         throw new InvalidDataException("NumberOfUsersSharedWith is a required property for CollectionDetail and cannot be null");
     }
     else
     {
         this.NumberOfUsersSharedWith = NumberOfUsersSharedWith;
     }
     // to ensure "CollectionShareId" is required (not null)
     if (CollectionShareId == null)
     {
         throw new InvalidDataException("CollectionShareId is a required property for CollectionDetail and cannot be null");
     }
     else
     {
         this.CollectionShareId = CollectionShareId;
     }
     // to ensure "NumberOfHits" is required (not null)
     if (NumberOfHits == null)
     {
         throw new InvalidDataException("NumberOfHits is a required property for CollectionDetail and cannot be null");
     }
     else
     {
         this.NumberOfHits = NumberOfHits;
     }
     // to ensure "Title" is required (not null)
     if (Title == null)
     {
         throw new InvalidDataException("Title is a required property for CollectionDetail and cannot be null");
     }
     else
     {
         this.Title = Title;
     }
     // to ensure "Description" is required (not null)
     if (Description == null)
     {
         throw new InvalidDataException("Description is a required property for CollectionDetail and cannot be null");
     }
     else
     {
         this.Description = Description;
     }
     // to ensure "CreationDate" is required (not null)
     if (CreationDate == null)
     {
         throw new InvalidDataException("CreationDate is a required property for CollectionDetail and cannot be null");
     }
     else
     {
         this.CreationDate = CreationDate;
     }
     // to ensure "FilePath" is required (not null)
     if (FilePath == null)
     {
         throw new InvalidDataException("FilePath is a required property for CollectionDetail and cannot be null");
     }
     else
     {
         this.FilePath = FilePath;
     }
     this.NumberOfParts = NumberOfParts;
     this.DeletionDate  = DeletionDate;
 }
Beispiel #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UserCollectionSummary" /> class.
 /// </summary>
 /// <param name="ViewingUsername">The username of the user that has access to this collection (required).</param>
 /// <param name="Status">The status of the collection (required).</param>
 /// <param name="SharedToMe">Whether this collection has been shared to the given user by someone else (required).</param>
 /// <param name="SharedByMe">Whether this collection has been shared to others by the given user (required).</param>
 /// <param name="Id">The collection&#39;s id (required).</param>
 /// <param name="Title">The title of the collection (required).</param>
 /// <param name="Description">The description of the collection (required).</param>
 /// <param name="CreationDate">The date the collection was created (required).</param>
 /// <param name="Owner">The details of the user that created this collection (required).</param>
 /// <param name="DeletionDate">The date the collection was deleted, or null if it has not been deleted (required).</param>
 /// <param name="NumberOfParts">The number of parts within this collection.</param>
 /// <param name="NumberOfUsersSharedWith">The number of people this collection has been shared with (required).</param>
 /// <param name="CollectionShareId">The id of the share associated with this collection, or null if the  collection has not yet been shared (required).</param>
 /// <param name="NumberOfHits">The number of hits associated with this collection (required).</param>
 public UserCollectionSummary(string ViewingUsername = default(string), StatusEnum Status = default(StatusEnum), bool?SharedToMe = default(bool?), bool?SharedByMe = default(bool?), int?Id = default(int?), string Title = default(string), string Description = default(string), DateTime?CreationDate = default(DateTime?), UserDisplayDetails Owner = default(UserDisplayDetails), DateTime?DeletionDate = default(DateTime?), int?NumberOfParts = default(int?), int?NumberOfUsersSharedWith = default(int?), int?CollectionShareId = default(int?), int?NumberOfHits = default(int?))
 {
     // to ensure "ViewingUsername" is required (not null)
     if (ViewingUsername == null)
     {
         throw new InvalidDataException("ViewingUsername is a required property for UserCollectionSummary and cannot be null");
     }
     else
     {
         this.ViewingUsername = ViewingUsername;
     }
     // to ensure "Status" is required (not null)
     if (Status == null)
     {
         throw new InvalidDataException("Status is a required property for UserCollectionSummary and cannot be null");
     }
     else
     {
         this.Status = Status;
     }
     // to ensure "SharedToMe" is required (not null)
     if (SharedToMe == null)
     {
         throw new InvalidDataException("SharedToMe is a required property for UserCollectionSummary and cannot be null");
     }
     else
     {
         this.SharedToMe = SharedToMe;
     }
     // to ensure "SharedByMe" is required (not null)
     if (SharedByMe == null)
     {
         throw new InvalidDataException("SharedByMe is a required property for UserCollectionSummary and cannot be null");
     }
     else
     {
         this.SharedByMe = SharedByMe;
     }
     // to ensure "Id" is required (not null)
     if (Id == null)
     {
         throw new InvalidDataException("Id is a required property for UserCollectionSummary and cannot be null");
     }
     else
     {
         this.Id = Id;
     }
     // to ensure "Title" is required (not null)
     if (Title == null)
     {
         throw new InvalidDataException("Title is a required property for UserCollectionSummary and cannot be null");
     }
     else
     {
         this.Title = Title;
     }
     // to ensure "Description" is required (not null)
     if (Description == null)
     {
         throw new InvalidDataException("Description is a required property for UserCollectionSummary and cannot be null");
     }
     else
     {
         this.Description = Description;
     }
     // to ensure "CreationDate" is required (not null)
     if (CreationDate == null)
     {
         throw new InvalidDataException("CreationDate is a required property for UserCollectionSummary and cannot be null");
     }
     else
     {
         this.CreationDate = CreationDate;
     }
     // to ensure "Owner" is required (not null)
     if (Owner == null)
     {
         throw new InvalidDataException("Owner is a required property for UserCollectionSummary and cannot be null");
     }
     else
     {
         this.Owner = Owner;
     }
     // to ensure "DeletionDate" is required (not null)
     if (DeletionDate == null)
     {
         throw new InvalidDataException("DeletionDate is a required property for UserCollectionSummary and cannot be null");
     }
     else
     {
         this.DeletionDate = DeletionDate;
     }
     // to ensure "NumberOfUsersSharedWith" is required (not null)
     if (NumberOfUsersSharedWith == null)
     {
         throw new InvalidDataException("NumberOfUsersSharedWith is a required property for UserCollectionSummary and cannot be null");
     }
     else
     {
         this.NumberOfUsersSharedWith = NumberOfUsersSharedWith;
     }
     // to ensure "CollectionShareId" is required (not null)
     if (CollectionShareId == null)
     {
         throw new InvalidDataException("CollectionShareId is a required property for UserCollectionSummary and cannot be null");
     }
     else
     {
         this.CollectionShareId = CollectionShareId;
     }
     // to ensure "NumberOfHits" is required (not null)
     if (NumberOfHits == null)
     {
         throw new InvalidDataException("NumberOfHits is a required property for UserCollectionSummary and cannot be null");
     }
     else
     {
         this.NumberOfHits = NumberOfHits;
     }
     this.NumberOfParts = NumberOfParts;
 }
Beispiel #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CollectionShareUpdate" /> class.
 /// </summary>
 /// <param name="Id">The id of the update (required).</param>
 /// <param name="Timestamp">The timestamp of when the update happened (required).</param>
 /// <param name="User">The user that initiated this share update (required).</param>
 /// <param name="Notes">The notes associated with this share update (required).</param>
 /// <param name="NumberOfAddedUsers">The number of users that were added to this share as part of this update (required).</param>
 /// <param name="FirstAddedUser">The first of the users that were added to this share as part of this update (required).</param>
 /// <param name="NumberOfRemovedUsers">The number of users that were removed from this share as part of this update (required).</param>
 /// <param name="FirstRemovedUser">The first of the users that were removed from this share as part of this update (required).</param>
 public CollectionShareUpdate(int?Id = default(int?), DateTime?Timestamp = default(DateTime?), UserDisplayDetails User = default(UserDisplayDetails), string Notes = default(string), int?NumberOfAddedUsers = default(int?), UserDisplayDetails FirstAddedUser = default(UserDisplayDetails), int?NumberOfRemovedUsers = default(int?), UserDisplayDetails FirstRemovedUser = default(UserDisplayDetails))
 {
     // to ensure "Id" is required (not null)
     if (Id == null)
     {
         throw new InvalidDataException("Id is a required property for CollectionShareUpdate and cannot be null");
     }
     else
     {
         this.Id = Id;
     }
     // to ensure "Timestamp" is required (not null)
     if (Timestamp == null)
     {
         throw new InvalidDataException("Timestamp is a required property for CollectionShareUpdate and cannot be null");
     }
     else
     {
         this.Timestamp = Timestamp;
     }
     // to ensure "User" is required (not null)
     if (User == null)
     {
         throw new InvalidDataException("User is a required property for CollectionShareUpdate and cannot be null");
     }
     else
     {
         this.User = User;
     }
     // to ensure "Notes" is required (not null)
     if (Notes == null)
     {
         throw new InvalidDataException("Notes is a required property for CollectionShareUpdate and cannot be null");
     }
     else
     {
         this.Notes = Notes;
     }
     // to ensure "NumberOfAddedUsers" is required (not null)
     if (NumberOfAddedUsers == null)
     {
         throw new InvalidDataException("NumberOfAddedUsers is a required property for CollectionShareUpdate and cannot be null");
     }
     else
     {
         this.NumberOfAddedUsers = NumberOfAddedUsers;
     }
     // to ensure "FirstAddedUser" is required (not null)
     if (FirstAddedUser == null)
     {
         throw new InvalidDataException("FirstAddedUser is a required property for CollectionShareUpdate and cannot be null");
     }
     else
     {
         this.FirstAddedUser = FirstAddedUser;
     }
     // to ensure "NumberOfRemovedUsers" is required (not null)
     if (NumberOfRemovedUsers == null)
     {
         throw new InvalidDataException("NumberOfRemovedUsers is a required property for CollectionShareUpdate and cannot be null");
     }
     else
     {
         this.NumberOfRemovedUsers = NumberOfRemovedUsers;
     }
     // to ensure "FirstRemovedUser" is required (not null)
     if (FirstRemovedUser == null)
     {
         throw new InvalidDataException("FirstRemovedUser is a required property for CollectionShareUpdate and cannot be null");
     }
     else
     {
         this.FirstRemovedUser = FirstRemovedUser;
     }
 }