Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ShareDetail" /> class.
 /// </summary>
 /// <param name="Id">The id of the share (required).</param>
 /// <param name="ShareableType">The type of the shareable item (collection, list, etc.) (required).</param>
 /// <param name="ShareableId">The id of the shareable item being shared (required).</param>
 /// <param name="ShareableTitle">The title of the shareable item being shared (required).</param>
 /// <param name="NumberOfUsersSharedWith">The number of people the shareable item has been shared with (required).</param>
 /// <param name="ViewShareableUrl">The URL of a page that will allow users to view the shareable item. (required).</param>
 public ShareDetail(int?Id = default(int?), ShareableTypeEnum ShareableType = default(ShareableTypeEnum), int?ShareableId = default(int?), string ShareableTitle = default(string), int?NumberOfUsersSharedWith = default(int?), string ViewShareableUrl = default(string))
 {
     // to ensure "Id" is required (not null)
     if (Id == null)
     {
         throw new InvalidDataException("Id is a required property for ShareDetail and cannot be null");
     }
     else
     {
         this.Id = Id;
     }
     // to ensure "ShareableType" is required (not null)
     if (ShareableType == null)
     {
         throw new InvalidDataException("ShareableType is a required property for ShareDetail and cannot be null");
     }
     else
     {
         this.ShareableType = ShareableType;
     }
     // to ensure "ShareableId" is required (not null)
     if (ShareableId == null)
     {
         throw new InvalidDataException("ShareableId is a required property for ShareDetail and cannot be null");
     }
     else
     {
         this.ShareableId = ShareableId;
     }
     // to ensure "ShareableTitle" is required (not null)
     if (ShareableTitle == null)
     {
         throw new InvalidDataException("ShareableTitle is a required property for ShareDetail and cannot be null");
     }
     else
     {
         this.ShareableTitle = ShareableTitle;
     }
     // to ensure "NumberOfUsersSharedWith" is required (not null)
     if (NumberOfUsersSharedWith == null)
     {
         throw new InvalidDataException("NumberOfUsersSharedWith is a required property for ShareDetail and cannot be null");
     }
     else
     {
         this.NumberOfUsersSharedWith = NumberOfUsersSharedWith;
     }
     // to ensure "ViewShareableUrl" is required (not null)
     if (ViewShareableUrl == null)
     {
         throw new InvalidDataException("ViewShareableUrl is a required property for ShareDetail and cannot be null");
     }
     else
     {
         this.ViewShareableUrl = ViewShareableUrl;
     }
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CreateShareDetail" /> class.
 /// </summary>
 /// <param name="ShareableType">The type of the shareable item (collection, list, etc.) being shared (required).</param>
 /// <param name="ShareableId">The id of the shareable item being shared (required).</param>
 /// <param name="EmailAddressesToAdd">The list of email addresses to share this shareable item with (required).</param>
 /// <param name="NotifyAddedUsers">Whether to notify the users added in this share that the shareable item has now been shared with them (required).</param>
 /// <param name="AddedUserNotificationMessage">If added users are to be notified, this is the message to be sent to them.  The URL of the view of the shareable item (specified when the shareable item was created)  will be added to the notification after this message..</param>
 /// <param name="Notes">The notes associated with this share update.</param>
 /// <param name="ViewShareableUrl">A URL of a page to view the shareable item.  If specified this will be used in notification  messages to show added or removed users where to view the shareable item    If the URL is specified, it can use {shareableId} and {emailAddress} parameters    http://www.example.com/collections/{shareableId}?email&#x3D;{emailAddress}    If present, these parameters will be replaced with the id of the shareable item and the email address of the user being added/removed.</param>
 public CreateShareDetail(ShareableTypeEnum ShareableType = default(ShareableTypeEnum), int?ShareableId = default(int?), List <string> EmailAddressesToAdd = default(List <string>), bool?NotifyAddedUsers = default(bool?), string AddedUserNotificationMessage = default(string), string Notes = default(string), string ViewShareableUrl = default(string))
 {
     // to ensure "ShareableType" is required (not null)
     if (ShareableType == null)
     {
         throw new InvalidDataException("ShareableType is a required property for CreateShareDetail and cannot be null");
     }
     else
     {
         this.ShareableType = ShareableType;
     }
     // to ensure "ShareableId" is required (not null)
     if (ShareableId == null)
     {
         throw new InvalidDataException("ShareableId is a required property for CreateShareDetail and cannot be null");
     }
     else
     {
         this.ShareableId = ShareableId;
     }
     // to ensure "EmailAddressesToAdd" is required (not null)
     if (EmailAddressesToAdd == null)
     {
         throw new InvalidDataException("EmailAddressesToAdd is a required property for CreateShareDetail and cannot be null");
     }
     else
     {
         this.EmailAddressesToAdd = EmailAddressesToAdd;
     }
     // to ensure "NotifyAddedUsers" is required (not null)
     if (NotifyAddedUsers == null)
     {
         throw new InvalidDataException("NotifyAddedUsers is a required property for CreateShareDetail and cannot be null");
     }
     else
     {
         this.NotifyAddedUsers = NotifyAddedUsers;
     }
     this.AddedUserNotificationMessage = AddedUserNotificationMessage;
     this.Notes            = Notes;
     this.ViewShareableUrl = ViewShareableUrl;
 }