/* * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using Newtonsoft.Json; using System.Collections.Generic; using System; namespace QuantConnect.Api { /// /// Response received when fetching Object Store /// public class GetObjectStoreResponse : RestResponse { /// /// Job ID which can be used for querying state or packaging /// [JsonProperty("jobId")] public string JobId { get; set; } /// /// The URL to download the object. This can also be null /// [JsonProperty("url")] public string Url { get; set; } } /// /// Class contining basic store properties present in the REST response from QC API /// public class BasicObjectStore { /// /// Object store key /// [JsonProperty(PropertyName = "key")] public string Key { get; set; } /// /// Last time it was modified /// [JsonProperty(PropertyName = "modified")] public DateTime? Modified { get; set; } /// /// MIME type /// [JsonProperty(PropertyName = "mime")] public string Mime { get; set; } /// /// File size /// [JsonProperty(PropertyName = "size")] public decimal? Size { get; set; } } /// /// Summary information of the Object Store /// public class SummaryObjectStore: BasicObjectStore { /// /// File or folder name /// [JsonProperty(PropertyName = "name")] public string Name { get; set; } /// /// True if it is a folder, false otherwise /// [JsonProperty(PropertyName = "isFolder")] public bool IsFolder { get; set; } } /// /// Object Store file properties /// public class PropertiesObjectStore: BasicObjectStore { /// /// Date this object was created /// [JsonProperty(PropertyName = "created")] public DateTime Created { get; set; } /// /// MD5 (hashing algorithm) hash authentication code /// [JsonProperty(PropertyName = "md5")] public string Md5 { get; set; } /// /// Preview of the Object Store file content /// [JsonProperty(PropertyName = "preview")] public string Preview { get; set; } } /// /// Response received containing a list of stored objects metadata, as well as the total size of all of them. /// public class ListObjectStoreResponse : RestResponse { /// /// Path to the files in the Object Store /// [JsonProperty(PropertyName = "path")] public string Path { get; set; } /// /// List of objects stored /// [JsonProperty(PropertyName = "objects")] public List Objects { get; set; } /// /// Size of all objects stored in bytes /// [JsonProperty(PropertyName = "objectStorageUsed")] public long ObjectStorageUsed { get; set; } /// /// Size of all the objects stored in human-readable format /// [JsonProperty(PropertyName = "objectStorageUsedHuman")] public string ObjectStorageUsedHuman { get; set; } } /// /// Response received containing the properties of the requested Object Store /// public class PropertiesObjectStoreResponse : RestResponse { /// /// Object Store properties /// [JsonProperty(PropertyName = "metadata")] public PropertiesObjectStore Properties { get; set; } } }