Model
This model should NOT be considered as an official model from Easit but as a POC and example of how one could consume the Easit GO WebAPI with .NET.
Requests
GetItemsRequest
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48 | using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace EasitGO.WebAPI.Rest.Model
{
[DataContract]
public class GetItemsRequest
{
[DataMember(Name = "columnFilter", EmitDefaultValue = false)]
public List<ColumnFilter> ColumnFilter { get; set; }
[DataMember(Name = "freeTextFilter", EmitDefaultValue = false)]
public string FreeTextFilter { get; set; }
[DataMember(Name = "idFilter", EmitDefaultValue = false)]
public string IdFilter { get; set; }
[DataMember(Name = "itemViewIdentifier", EmitDefaultValue = false)]
public string ItemViewIdentifier { get; set; }
[DataMember(Name = "page", EmitDefaultValue = false)]
public int? Page { get; set; }
[DataMember(Name = "sortColumn", EmitDefaultValue = false)]
public SortColumn SortColumn { get; set; }
public GetItemsRequest(
List<ColumnFilter> columnFilter = default(List<ColumnFilter>),
string freeTextFilter = default(string),
string idFilter = default(string),
string itemViewIdentifier = default(string),
int? page = default(int?),
SortColumn sortColumn = default(SortColumn))
{
this.ColumnFilter = columnFilter;
this.FreeTextFilter = freeTextFilter;
this.IdFilter = idFilter;
this.ItemViewIdentifier = itemViewIdentifier;
this.Page = page;
this.SortColumn = sortColumn;
}
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}
|
Returns: GetItemsResponse
ColumnFilter
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 | using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace EasitGO.WebAPI.Rest.Model
{
[DataContract]
public class ColumnFilter
{
[DataMember(Name = "columnName", EmitDefaultValue = false)]
public string ColumnName { get; set; }
[DataMember(Name = "comparator", EmitDefaultValue = false)]
public string Comparator { get; set; }
[DataMember(Name = "content", EmitDefaultValue = false)]
public string Content { get; set; }
[DataMember(Name = "rawValue", EmitDefaultValue = false)]
public string RawValue { get; set; }
public ColumnFilter(
string columnName = default(string),
string comparator = default(string),
string content = default(string),
string rawValue = default(string))
{
this.ColumnName = columnName;
this.Comparator = comparator;
this.Content = content;
this.RawValue = rawValue;
}
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}
|
SortColumn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 | using Newtonsoft.Json;
using System.Runtime.Serialization;
namespace EasitGO.WebAPI.Rest.Model
{
[DataContract]
public partial class SortColumn
{
[DataMember(Name = "content", EmitDefaultValue = false)]
public string Content { get; set; }
[DataMember(Name = "order", EmitDefaultValue = false)]
public string Order { get; set; }
public SortColumn(string content = default(string), string order = default(string))
{
this.Content = content;
this.Order = order;
}
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}
|
ImportItemsRequest
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 | using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace EasitGO.WebAPI.Rest.Model
{
[DataContract]
public class ImportItemsRequest
{
[DataMember(Name = "importHandlerIdentifier", EmitDefaultValue = false)]
public string ImportHandlerIdentifier { get; set; }
[DataMember(Name = "itemToImport", EmitDefaultValue = false)]
public List<ItemToImport> ItemToImport { get; set; }
public ImportItemsRequest
(
string importHandlerIdentifier = default(string),
List<ItemToImport> itemToImport = default(List<ItemToImport>)
)
{
this.ImportHandlerIdentifier = importHandlerIdentifier;
this.ItemToImport = itemToImport;
}
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}
|
Returns: ImportItemsResponse
ItemToImport
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41 | using Newtonsoft.Json;
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace EasitGO.WebAPI.Rest.Model
{
[DataContract]
public class ItemToImport
{
[DataMember(Name = "attachment", EmitDefaultValue = false)]
public List<Attachment> Attachment { get; set; }
[DataMember(Name = "id", EmitDefaultValue = false)]
public string Id { get; set; }
[DataMember(Name = "property", EmitDefaultValue = false)]
public List<Property> Property { get; set; }
[DataMember(Name = "uid", EmitDefaultValue = false)]
public string Uid { get; set; }
public ItemToImport
(
List<Attachment> attachment = default(List<Attachment>),
string id = default(string),
List<Property> property = default(List<Property>),
string uid = default(string)
)
{
this.Attachment = attachment;
this.Id = id;
this.Property = property;
this.Uid = uid;
}
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}
|
Responses
GetItemsResponse
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49 | using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace EasitGO.WebAPI.Rest.Model
{
[DataContract]
public class GetItemsResponse
{
[DataMember(Name = "columns", EmitDefaultValue = false)]
public Columns Columns { get; set; }
[DataMember(Name = "items", EmitDefaultValue = false)]
public Items Items { get; set; }
[DataMember(Name = "page", EmitDefaultValue = false)]
public int? Page { get; set; }
[DataMember(Name = "requestedPage", EmitDefaultValue = false)]
public int? RequestedPage { get; set; }
[DataMember(Name = "totalNumberOfItems", EmitDefaultValue = false)]
public int? TotalNumberOfItems { get; set; }
[DataMember(Name = "totalNumberOfPages", EmitDefaultValue = false)]
public int? TotalNumberOfPages { get; set; }
public GetItemsResponse(
Columns columns = default(Columns),
Items items = default(Items),
int? page = default(int?),
int? requestedPage = default(int?),
int? totalNumberOfItems = default(int?),
int? totalNumberOfPages = default(int?)
)
{
this.Columns = columns;
this.Items = items;
this.Page = page;
this.RequestedPage = requestedPage;
this.TotalNumberOfItems = totalNumberOfItems;
this.TotalNumberOfPages = totalNumberOfPages;
}
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}
|
Columns
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 | using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace EasitGO.WebAPI.Rest.Model
{
[DataContract]
public class Columns
{
[DataMember(Name = "column", EmitDefaultValue = false)]
public List<Column> Column { get; set; }
public Columns(List<Column> column = default(List<Column>))
{
this.Column = column;
}
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}
|
Column
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40 | using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace EasitGO.WebAPI.Rest.Model
{
[DataContract]
public class Column
{
[DataMember(Name = "collection", EmitDefaultValue = false)]
public bool? Collection { get; set; }
[DataMember(Name = "connectiontype", EmitDefaultValue = false)]
public string Connectiontype { get; set; }
[DataMember(Name = "content", EmitDefaultValue = false)]
public string Content { get; set; }
[DataMember(Name = "datatype", EmitDefaultValue = false)]
public string Datatype { get; set; }
public Column
(
bool? collection = default(bool?),
string connectiontype = default(string),
string content = default(string),
string datatype = default(string)
)
{
this.Collection = collection;
this.Connectiontype = connectiontype;
this.Content = content;
this.Datatype = datatype;
}
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}
|
Items
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 | using Newtonsoft.Json;
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace EasitGO.WebAPI.Rest.Model
{
[DataContract]
public class Items
{
[DataMember(Name = "item", EmitDefaultValue = false)]
public List<Item> Item { get; set; }
public Items(List<Item> item = default(List<Item>))
{
this.Item = item;
}
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}
|
Item
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 | using Newtonsoft.Json;
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace EasitGO.WebAPI.Rest.Model
{
[DataContract]
public class Item
{
[DataMember(Name = "attachment", EmitDefaultValue = false)]
public List<Attachment> Attachment { get; set; }
[DataMember(Name = "id", EmitDefaultValue = false)]
public string Id { get; set; }
[DataMember(Name = "property", EmitDefaultValue = false)]
public List<Property> Property { get; set; }
public Item
(
List<Attachment> attachment = default(List<Attachment>),
string id = default(string),
List<Property> property = default(List<Property>))
{
this.Attachment = attachment;
this.Id = id;
this.Property = property;
}
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}
|
ImportItemsResponse
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 | using Newtonsoft.Json;
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace EasitGO.WebAPI.Rest.Model
{
[DataContract]
public class ImportItemsResponse
{
[DataMember(Name = "importItemResult", EmitDefaultValue = false)]
public List<ImportItemResult> ImportItemResult { get; set; }
public ImportItemsResponse(List<ImportItemResult> importItemResult = default(List<ImportItemResult>))
{
this.ImportItemResult = importItemResult;
}
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}
|
ImportItemResult
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40 | using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace EasitGO.WebAPI.Rest.Model
{
[DataContract]
public class ImportItemResult
{
[DataMember(Name = "result", EmitDefaultValue = false)]
public string Result { get; set; }
[DataMember(Name = "returnValues", EmitDefaultValue = false)]
public ReturnValues ReturnValues { get; set; }
[DataMember(Name = "skippedOrExceptionMessage", EmitDefaultValue = false)]
public string SkippedOrExceptionMessage { get; set; }
[DataMember(Name = "uid", EmitDefaultValue = false)]
public string Uid { get; set; }
public ImportItemResult
(
string result = default(string),
ReturnValues returnValues = default(ReturnValues),
string skippedOrExceptionMessage = default(string),
string uid = default(string)
)
{
this.Result = result;
this.ReturnValues = returnValues;
this.SkippedOrExceptionMessage = skippedOrExceptionMessage;
this.Uid = uid;
}
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}
|
ReturnValues
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 | using Newtonsoft.Json;
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace EasitGO.WebAPI.Rest.Model
{
[DataContract]
public class ReturnValues
{
[DataMember(Name = "returnValue", EmitDefaultValue = false)]
public List<ReturnValue> ReturnValue { get; set; }
public ReturnValues
(
List<ReturnValue> returnValue = default(List<ReturnValue>)
)
{
this.ReturnValue = returnValue;
}
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}
|
ReturnValue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 | using Newtonsoft.Json;
using System.Runtime.Serialization;
namespace EasitGO.WebAPI.Rest.Model
{
[DataContract]
public class ReturnValue
{
[DataMember(Name = "content", EmitDefaultValue = false)]
public string Content { get; set; }
[DataMember(Name = "name", EmitDefaultValue = false)]
public string Name { get; set; }
public ReturnValue
(
string content = default(string),
string name = default(string)
)
{
this.Content = content;
this.Name = name;
}
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}
|
Shared
Property
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 | using Newtonsoft.Json;
using System.Runtime.Serialization;
namespace EasitGO.WebAPI.Rest.Model
{
[DataContract]
public class Property
{
[DataMember(Name = "content", EmitDefaultValue = false)]
public string Content { get; set; }
[DataMember(Name = "name", EmitDefaultValue = false)]
public string Name { get; set; }
[DataMember(Name = "rawValue", EmitDefaultValue = false)]
public string RawValue { get; set; }
public Property
(
string content = default(string),
string name = default(string),
string rawValue = default(string)
)
{
this.Content = content;
this.Name = name;
this.RawValue = rawValue;
}
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}
|
Attachment
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 | using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace EasitGO.WebAPI.Rest.Model
{
[DataContract]
public class Attachment
{
[DataMember(Name = "contentId", EmitDefaultValue = false)]
public string ContentId { get; set; }
[DataMember(Name = "name", EmitDefaultValue = false)]
public string Name { get; set; }
[DataMember(Name = "value", EmitDefaultValue = false)]
public byte[] Value { get; set; }
public Attachment(string contentId, string name, byte[] value)
{
this.ContentId = contentId;
this.Name = name;
this.Value = value;
}
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}
|