/// <summary> /// Initializes a new instance of the <see cref="ContributionResource" /> class. /// </summary> /// <param name="Artist">A reference to the contributing artist (required).</param> /// <param name="Media">A reference to the media being contributed to (required).</param> /// <param name="Role">The nature of the contribution (role of the artist as in 'producer', 'performer', etc) (required).</param> public ContributionResource(SimpleReferenceResourcelong Artist = default(SimpleReferenceResourcelong), SimpleReferenceResourcelong Media = default(SimpleReferenceResourcelong), string Role = default(string)) { // to ensure "Artist" is required (not null) if (Artist == null) { throw new InvalidDataException("Artist is a required property for ContributionResource and cannot be null"); } else { this.Artist = Artist; } // to ensure "Media" is required (not null) if (Media == null) { throw new InvalidDataException("Media is a required property for ContributionResource and cannot be null"); } else { this.Media = Media; } // to ensure "Role" is required (not null) if (Role == null) { throw new InvalidDataException("Role is a required property for ContributionResource and cannot be null"); } else { this.Role = Role; } }
/// <summary> /// Initializes a new instance of the <see cref="VideoRelationshipResource" /> class. /// </summary> /// <param name="From">The owner of the relationship.</param> /// <param name="RelationshipDetails">Details about the relationship such as type or other information. Max length 10 characters (required).</param> /// <param name="To">The target of the relationship. (required).</param> public VideoRelationshipResource(SimpleReferenceResourcelong From = default(SimpleReferenceResourcelong), string RelationshipDetails = default(string), SimpleReferenceResourcelong To = default(SimpleReferenceResourcelong)) { // to ensure "RelationshipDetails" is required (not null) if (RelationshipDetails == null) { throw new InvalidDataException("RelationshipDetails is a required property for VideoRelationshipResource and cannot be null"); } else { this.RelationshipDetails = RelationshipDetails; } // to ensure "To" is required (not null) if (To == null) { throw new InvalidDataException("To is a required property for VideoRelationshipResource and cannot be null"); } else { this.To = To; } this.From = From; }
/// <summary> /// Initializes a new instance of the <see cref="VideoResource" /> class. /// </summary> /// <param name="AdditionalProperties">A map of additional properties, keyed on the property name. Must match the names and types defined in the template for this item type.</param> /// <param name="Author">The original artist of the media.</param> /// <param name="Authored">The date the media was created as a unix timestamp in seconds.</param> /// <param name="Category">The category of the video (required).</param> /// <param name="Comments">The comments of the video.</param> /// <param name="Contributors">Artists that contributed to the creation. See separate endpoint to add to list.</param> /// <param name="Embed">The country of an embedable version.</param> /// <param name="Extension">The file extension of the media file. 1-5 characters (required).</param> /// <param name="Height">The height of the video in px (required).</param> /// <param name="Length">The length of the video in seconds (required).</param> /// <param name="Location">The country of the media. Typically a url. Cannot be blank (required).</param> /// <param name="LongDescription">The user friendly name of that resource. Defaults to blank string.</param> /// <param name="MimeType">The mime-type of the media.</param> /// <param name="Name">The user friendly name of that resource (required).</param> /// <param name="Priority">The sort order of the video. default: 100.</param> /// <param name="Privacy">The privacy setting. default: private.</param> /// <param name="Published">Whether the video has been made public. Default true.</param> /// <param name="ShortDescription">The user friendly name of that resource. Defaults to blank string.</param> /// <param name="Size">The size of the media. Minimum 0 if supplied.</param> /// <param name="Tags">The tags for the video.</param> /// <param name="Template">A video template this video is validated against (private). May be null and no validation of additional_properties will be done.</param> /// <param name="Thumbnail">The country of a thumbnail version. Typically a url.</param> /// <param name="Uploader">The user the media was uploaded by. May be null for system uploaded media. May only be set to a user other than the current caller if VIDEOS_ADMIN permission. Null will mean the caller is the uploader unless the caller has VIDEOS_ADMIN permission, in which case it will be set to null.</param> /// <param name="Width">The width of the video in px (required).</param> public VideoResource(Dictionary <string, Property> AdditionalProperties = default(Dictionary <string, Property>), SimpleReferenceResourcelong Author = default(SimpleReferenceResourcelong), long?Authored = default(long?), SimpleReferenceResourcestring Category = default(SimpleReferenceResourcestring), List <CommentResource> Comments = default(List <CommentResource>), List <ContributionResource> Contributors = default(List <ContributionResource>), string Embed = default(string), string Extension = default(string), int?Height = default(int?), int?Length = default(int?), string Location = default(string), string LongDescription = default(string), string MimeType = default(string), string Name = default(string), int?Priority = default(int?), PrivacyEnum?Privacy = default(PrivacyEnum?), bool?Published = default(bool?), string ShortDescription = default(string), long?Size = default(long?), List <string> Tags = default(List <string>), string Template = default(string), string Thumbnail = default(string), SimpleUserResource Uploader = default(SimpleUserResource), int?Width = default(int?)) { // to ensure "Category" is required (not null) if (Category == null) { throw new InvalidDataException("Category is a required property for VideoResource and cannot be null"); } else { this.Category = Category; } // to ensure "Extension" is required (not null) if (Extension == null) { throw new InvalidDataException("Extension is a required property for VideoResource and cannot be null"); } else { this.Extension = Extension; } // to ensure "Height" is required (not null) if (Height == null) { throw new InvalidDataException("Height is a required property for VideoResource and cannot be null"); } else { this.Height = Height; } // to ensure "Length" is required (not null) if (Length == null) { throw new InvalidDataException("Length is a required property for VideoResource and cannot be null"); } else { this.Length = Length; } // to ensure "Location" is required (not null) if (Location == null) { throw new InvalidDataException("Location is a required property for VideoResource and cannot be null"); } else { this.Location = Location; } // to ensure "Name" is required (not null) if (Name == null) { throw new InvalidDataException("Name is a required property for VideoResource and cannot be null"); } else { this.Name = Name; } // to ensure "Width" is required (not null) if (Width == null) { throw new InvalidDataException("Width is a required property for VideoResource and cannot be null"); } else { this.Width = Width; } this.AdditionalProperties = AdditionalProperties; this.Author = Author; this.Authored = Authored; this.Comments = Comments; this.Contributors = Contributors; this.Embed = Embed; this.LongDescription = LongDescription; this.MimeType = MimeType; this.Priority = Priority; this.Privacy = Privacy; this.Published = Published; this.ShortDescription = ShortDescription; this.Size = Size; this.Tags = Tags; this.Template = Template; this.Thumbnail = Thumbnail; this.Uploader = Uploader; }