Lean  $LEAN_TAG$
ObjectStoreResponse.cs
1 /*
2  * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
3  * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14 */
15 
16 using Newtonsoft.Json;
17 using System.Collections.Generic;
18 using System;
19 
20 namespace QuantConnect.Api
21 {
22  /// <summary>
23  /// Response received when fetching Object Store
24  /// </summary>
26  {
27  /// <summary>
28  /// Job ID which can be used for querying state or packaging
29  /// </summary>
30  [JsonProperty("jobId")]
31  public string JobId { get; set; }
32 
33  /// <summary>
34  /// The URL to download the object. This can also be null
35  /// </summary>
36  [JsonProperty("url")]
37  public string Url { get; set; }
38  }
39 
40  public class BasicObjectStore
41  {
42  /// <summary>
43  /// Object store key
44  /// </summary>
45  [JsonProperty(PropertyName = "key")]
46  public string Key { get; set; }
47 
48  /// <summary>
49  /// Last time it was modified
50  /// </summary>
51  [JsonProperty(PropertyName = "modified")]
52  public DateTime? Modified { get; set; }
53 
54  /// <summary>
55  /// MIME type
56  /// </summary>
57  [JsonProperty(PropertyName = "mime")]
58  public string Mime { get; set; }
59 
60  /// <summary>
61  /// File size
62  /// </summary>
63  [JsonProperty(PropertyName = "size")]
64  public decimal? Size { get; set; }
65  }
66 
67  /// <summary>
68  /// Summary information of the Object Store
69  /// </summary>
71  {
72  /// <summary>
73  /// File or folder name
74  /// </summary>
75  [JsonProperty(PropertyName = "name")]
76  public string Name { get; set; }
77 
78  /// <summary>
79  /// True if it is a folder, false otherwise
80  /// </summary>
81  [JsonProperty(PropertyName = "isFolder")]
82  public bool IsFolder { get; set; }
83  }
84 
85  /// <summary>
86  /// Object Store file properties
87  /// </summary>
89  {
90  /// <summary>
91  /// Date this object was created
92  /// </summary>
93  [JsonProperty(PropertyName = "created")]
94  public DateTime Created { get; set; }
95 
96  /// <summary>
97  /// MD5 (hashing algorithm) hash authentication code
98  /// </summary>
99  [JsonProperty(PropertyName = "md5")]
100  public string Md5 { get; set; }
101 
102  /// <summary>
103  /// Preview of the Object Store file content
104  /// </summary>
105  [JsonProperty(PropertyName = "preview")]
106  public string Preview { get; set; }
107  }
108 
109  /// <summary>
110  /// Response received containing a list of stored objects metadata, as well as the total size of all of them.
111  /// </summary>
113  {
114  /// <summary>
115  /// Path to the files in the Object Store
116  /// </summary>
117  [JsonProperty(PropertyName = "path")]
118  public string Path { get; set; }
119 
120  /// <summary>
121  /// List of objects stored
122  /// </summary>
123  [JsonProperty(PropertyName = "objects")]
124  public List<SummaryObjectStore> Objects { get; set; }
125 
126  /// <summary>
127  /// Size of all objects stored in bytes
128  /// </summary>
129  [JsonProperty(PropertyName = "objectStorageUsed")]
130  public int ObjectStorageUsed { get; set; }
131 
132  /// <summary>
133  /// Size of all the objects stored in human-readable format
134  /// </summary>
135  [JsonProperty(PropertyName = "objectStorageUsedHuman")]
136  public string ObjectStorageUsedHuman { get; set; }
137  }
138 
139  /// <summary>
140  /// Response received containing the properties of the requested Object Store
141  /// </summary>
143  {
144  /// <summary>
145  /// Object Store properties
146  /// </summary>
147  [JsonProperty(PropertyName = "metadata")]
148  public PropertiesObjectStore Properties { get; set; }
149  }
150 }