FarmMapsApiClient/FarmmapsApi/Models/FileRequest.cs

45 lines
1.2 KiB
C#
Raw Normal View History

using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json.Linq;
namespace FarmmapsApi.Models
{
public class FileRequest
{
/// <summary>
/// Code of the parent
/// </summary>
/// <example>41971e7ea8a446069a817e66b608dcae</example>
public string ParentCode { get; set; }
/// <summary>
/// Geometry meta data
/// </summary>
/// <example>{"type": "Point","coordinates": [5.27, 52.10]}</example>
public JObject Geometry { get; set; }
/// <summary>
/// Name of the file to upload
/// </summary>
/// <example>MyFile.tiff</example>
[Required]
public string Name { get; set; }
/// <summary>
/// Size of the file to upload
/// </summary>
/// <example>67351</example>
[Required]
public long Size { get; set; }
/// <summary>
/// If a chunked upload, the size of a single chunk
/// </summary>
/// <example>1048576</example>
public long ChunkSize { get; set; }
/// <summary>
/// Optional data for the item coupled with the file
/// </summary>
public JObject Data { get; set; }
}
}