/// <summary> /// Initializes a new instance of the <see cref="JsonApiDocumentBase" /> class. /// </summary> /// <param name="Jsonapi">Jsonapi.</param> /// <param name="Data">Data (required).</param> /// <param name="Included">Included.</param> public JsonApiDocumentBase(JsonApiVersionJsonapi Jsonapi = null, JsonApiResource Data = null, List <JsonApiResource> Included = null) { // to ensure "Data" is required (not null) if (Data == null) { throw new InvalidDataException("Data is a required property for JsonApiDocumentBase and cannot be null"); } else { this.Data = Data; } this.Jsonapi = Jsonapi; this.Included = Included; }
/// <summary> /// Initializes a new instance of the <see cref="Version" /> class. /// </summary> /// <param name="Jsonapi">Jsonapi.</param> /// <param name="Data">Data (required).</param> /// <param name="Included">Included.</param> /// <param name="Links">Links (required).</param> /// <param name="Id">resource id (required).</param> /// <param name="Type">Type (required).</param> /// <param name="Attributes">Attributes.</param> /// <param name="Meta">Meta.</param> /// <param name="Relationships">Relationships.</param> public Version(JsonApiVersionJsonapi Jsonapi = null, JsonApiResource Data = null, List <JsonApiResource> Included = null, JsonApiLinks Links = null, string Id = null, TypeEnum?Type = null, VersionAttributes Attributes = null, JsonApiMeta Meta = null, VersionRelationships Relationships = null) { // to ensure "Data" is required (not null) if (Data == null) { throw new InvalidDataException("Data is a required property for Version and cannot be null"); } else { this.Data = Data; } // to ensure "Links" is required (not null) if (Links == null) { throw new InvalidDataException("Links is a required property for Version and cannot be null"); } else { this.Links = Links; } // to ensure "Id" is required (not null) if (Id == null) { throw new InvalidDataException("Id is a required property for Version and cannot be null"); } else { this.Id = Id; } // to ensure "Type" is required (not null) if (Type == null) { throw new InvalidDataException("Type is a required property for Version and cannot be null"); } else { this.Type = Type; } this.Jsonapi = Jsonapi; this.Included = Included; this.Attributes = Attributes; this.Meta = Meta; this.Relationships = Relationships; }