/// <summary> /// Initializes a new instance of the <see cref="DownloadableDataSampleInterface" /> class. /// </summary> /// <param name="Id">Sample(or link) id.</param> /// <param name="Title">Title (required).</param> /// <param name="SortOrder">Order index for sample (required).</param> /// <param name="SampleType">SampleType (required).</param> /// <param name="SampleFile">relative file path.</param> /// <param name="SampleFileContent">SampleFileContent.</param> /// <param name="SampleUrl">file URL.</param> public DownloadableDataSampleInterface(int?Id = null, string Title = null, int?SortOrder = null, string SampleType = null, string SampleFile = null, DownloadableDataFileContentInterface SampleFileContent = null, string SampleUrl = null) { // to ensure "Title" is required (not null) if (Title == null) { throw new InvalidDataException("Title is a required property for DownloadableDataSampleInterface and cannot be null"); } else { this.Title = Title; } // to ensure "SortOrder" is required (not null) if (SortOrder == null) { throw new InvalidDataException("SortOrder is a required property for DownloadableDataSampleInterface and cannot be null"); } else { this.SortOrder = SortOrder; } // to ensure "SampleType" is required (not null) if (SampleType == null) { throw new InvalidDataException("SampleType is a required property for DownloadableDataSampleInterface and cannot be null"); } else { this.SampleType = SampleType; } this.Id = Id; this.SampleFile = SampleFile; this.SampleFileContent = SampleFileContent; this.SampleUrl = SampleUrl; }
/// <summary> /// Initializes a new instance of the <see cref="DownloadableDataLinkInterface" /> class. /// </summary> /// <param name="Id">Sample(or link) id.</param> /// <param name="Title">Title.</param> /// <param name="SortOrder">SortOrder (required).</param> /// <param name="IsShareable">Shareable status (required).</param> /// <param name="Price">Price (required).</param> /// <param name="NumberOfDownloads">Of downloads per user.</param> /// <param name="LinkType">LinkType (required).</param> /// <param name="LinkFile">relative file path.</param> /// <param name="LinkFileContent">LinkFileContent.</param> /// <param name="LinkUrl">Link url or null when type is 'file'.</param> /// <param name="SampleType">SampleType (required).</param> /// <param name="SampleFile">relative file path.</param> /// <param name="SampleFileContent">SampleFileContent.</param> /// <param name="SampleUrl">file URL.</param> public DownloadableDataLinkInterface(int?Id = null, string Title = null, int?SortOrder = null, int?IsShareable = null, decimal?Price = null, int?NumberOfDownloads = null, string LinkType = null, string LinkFile = null, DownloadableDataFileContentInterface LinkFileContent = null, string LinkUrl = null, string SampleType = null, string SampleFile = null, DownloadableDataFileContentInterface SampleFileContent = null, string SampleUrl = null) { // to ensure "SortOrder" is required (not null) if (SortOrder == null) { throw new InvalidDataException("SortOrder is a required property for DownloadableDataLinkInterface and cannot be null"); } else { this.SortOrder = SortOrder; } // to ensure "IsShareable" is required (not null) if (IsShareable == null) { throw new InvalidDataException("IsShareable is a required property for DownloadableDataLinkInterface and cannot be null"); } else { this.IsShareable = IsShareable; } // to ensure "Price" is required (not null) if (Price == null) { throw new InvalidDataException("Price is a required property for DownloadableDataLinkInterface and cannot be null"); } else { this.Price = Price; } // to ensure "LinkType" is required (not null) if (LinkType == null) { throw new InvalidDataException("LinkType is a required property for DownloadableDataLinkInterface and cannot be null"); } else { this.LinkType = LinkType; } // to ensure "SampleType" is required (not null) if (SampleType == null) { throw new InvalidDataException("SampleType is a required property for DownloadableDataLinkInterface and cannot be null"); } else { this.SampleType = SampleType; } this.Id = Id; this.Title = Title; this.NumberOfDownloads = NumberOfDownloads; this.LinkFile = LinkFile; this.LinkFileContent = LinkFileContent; this.LinkUrl = LinkUrl; this.SampleFile = SampleFile; this.SampleFileContent = SampleFileContent; this.SampleUrl = SampleUrl; }