forked from anthonyreilly/NetCoreForce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SfAsset.cs
executable file
·398 lines (354 loc) · 10.9 KB
/
SfAsset.cs
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
// SF API version v41.0
// Custom fields included: False
// Relationship objects included: True
using System;
using NetCoreForce.Client.Models;
using NetCoreForce.Client.Attributes;
using Newtonsoft.Json;
namespace NetCoreForce.Models
{
///<summary>
/// Asset
///<para>SObject Name: Asset</para>
///<para>Custom Object: False</para>
///</summary>
public class SfAsset : SObject
{
[JsonIgnore]
public static string SObjectTypeName
{
get { return "Asset"; }
}
///<summary>
/// Asset ID
/// <para>Name: Id</para>
/// <para>SF Type: id</para>
/// <para>Nillable: False</para>
///</summary>
[JsonProperty(PropertyName = "id")]
[Updateable(false), Createable(false)]
public string Id { get; set; }
///<summary>
/// Contact ID
/// <para>Name: ContactId</para>
/// <para>SF Type: reference</para>
/// <para>Nillable: True</para>
///</summary>
[JsonProperty(PropertyName = "contactId")]
public string ContactId { get; set; }
///<summary>
/// ReferenceTo: Contact
/// <para>RelationshipName: Contact</para>
///</summary>
[JsonProperty(PropertyName = "contact")]
[Updateable(false), Createable(false)]
public SfContact Contact { get; set; }
///<summary>
/// Account ID
/// <para>Name: AccountId</para>
/// <para>SF Type: reference</para>
/// <para>Nillable: True</para>
///</summary>
[JsonProperty(PropertyName = "accountId")]
public string AccountId { get; set; }
///<summary>
/// ReferenceTo: Account
/// <para>RelationshipName: Account</para>
///</summary>
[JsonProperty(PropertyName = "account")]
[Updateable(false), Createable(false)]
public SfAccount Account { get; set; }
///<summary>
/// Parent Asset ID
/// <para>Name: ParentId</para>
/// <para>SF Type: reference</para>
/// <para>Nillable: True</para>
///</summary>
[JsonProperty(PropertyName = "parentId")]
public string ParentId { get; set; }
///<summary>
/// ReferenceTo: Asset
/// <para>RelationshipName: Parent</para>
///</summary>
[JsonProperty(PropertyName = "parent")]
[Updateable(false), Createable(false)]
public SfAsset Parent { get; set; }
///<summary>
/// Root Asset ID
/// <para>Name: RootAssetId</para>
/// <para>SF Type: reference</para>
/// <para>Nillable: True</para>
///</summary>
[JsonProperty(PropertyName = "rootAssetId")]
[Updateable(false), Createable(false)]
public string RootAssetId { get; set; }
///<summary>
/// ReferenceTo: Asset
/// <para>RelationshipName: RootAsset</para>
///</summary>
[JsonProperty(PropertyName = "rootAsset")]
[Updateable(false), Createable(false)]
public SfAsset RootAsset { get; set; }
///<summary>
/// Product ID
/// <para>Name: Product2Id</para>
/// <para>SF Type: reference</para>
/// <para>Nillable: True</para>
///</summary>
[JsonProperty(PropertyName = "product2Id")]
public string Product2Id { get; set; }
///<summary>
/// ReferenceTo: Product2
/// <para>RelationshipName: Product2</para>
///</summary>
[JsonProperty(PropertyName = "product2")]
[Updateable(false), Createable(false)]
public SfProduct2 Product2 { get; set; }
///<summary>
/// Product Code
/// <para>Name: ProductCode</para>
/// <para>SF Type: string</para>
/// <para>Nillable: True</para>
///</summary>
[JsonProperty(PropertyName = "productCode")]
[Updateable(false), Createable(false)]
public string ProductCode { get; set; }
///<summary>
/// Competitor Asset
/// <para>Name: IsCompetitorProduct</para>
/// <para>SF Type: boolean</para>
/// <para>Nillable: False</para>
///</summary>
[JsonProperty(PropertyName = "isCompetitorProduct")]
public bool? IsCompetitorProduct { get; set; }
///<summary>
/// Created Date
/// <para>Name: CreatedDate</para>
/// <para>SF Type: datetime</para>
/// <para>Nillable: False</para>
///</summary>
[JsonProperty(PropertyName = "createdDate")]
[Updateable(false), Createable(false)]
public DateTimeOffset? CreatedDate { get; set; }
///<summary>
/// Created By ID
/// <para>Name: CreatedById</para>
/// <para>SF Type: reference</para>
/// <para>Nillable: False</para>
///</summary>
[JsonProperty(PropertyName = "createdById")]
[Updateable(false), Createable(false)]
public string CreatedById { get; set; }
///<summary>
/// ReferenceTo: User
/// <para>RelationshipName: CreatedBy</para>
///</summary>
[JsonProperty(PropertyName = "createdBy")]
[Updateable(false), Createable(false)]
public SfUser CreatedBy { get; set; }
///<summary>
/// Last Modified Date
/// <para>Name: LastModifiedDate</para>
/// <para>SF Type: datetime</para>
/// <para>Nillable: False</para>
///</summary>
[JsonProperty(PropertyName = "lastModifiedDate")]
[Updateable(false), Createable(false)]
public DateTimeOffset? LastModifiedDate { get; set; }
///<summary>
/// Last Modified By ID
/// <para>Name: LastModifiedById</para>
/// <para>SF Type: reference</para>
/// <para>Nillable: False</para>
///</summary>
[JsonProperty(PropertyName = "lastModifiedById")]
[Updateable(false), Createable(false)]
public string LastModifiedById { get; set; }
///<summary>
/// ReferenceTo: User
/// <para>RelationshipName: LastModifiedBy</para>
///</summary>
[JsonProperty(PropertyName = "lastModifiedBy")]
[Updateable(false), Createable(false)]
public SfUser LastModifiedBy { get; set; }
///<summary>
/// System Modstamp
/// <para>Name: SystemModstamp</para>
/// <para>SF Type: datetime</para>
/// <para>Nillable: False</para>
///</summary>
[JsonProperty(PropertyName = "systemModstamp")]
[Updateable(false), Createable(false)]
public DateTimeOffset? SystemModstamp { get; set; }
///<summary>
/// Deleted
/// <para>Name: IsDeleted</para>
/// <para>SF Type: boolean</para>
/// <para>Nillable: False</para>
///</summary>
[JsonProperty(PropertyName = "isDeleted")]
[Updateable(false), Createable(false)]
public bool? IsDeleted { get; set; }
///<summary>
/// Asset Name
/// <para>Name: Name</para>
/// <para>SF Type: string</para>
/// <para>Nillable: False</para>
///</summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
///<summary>
/// Serial Number
/// <para>Name: SerialNumber</para>
/// <para>SF Type: string</para>
/// <para>Nillable: True</para>
///</summary>
[JsonProperty(PropertyName = "serialNumber")]
public string SerialNumber { get; set; }
///<summary>
/// Install Date
/// <para>Name: InstallDate</para>
/// <para>SF Type: date</para>
/// <para>Nillable: True</para>
///</summary>
[JsonProperty(PropertyName = "installDate")]
public DateTime? InstallDate { get; set; }
///<summary>
/// Purchase Date
/// <para>Name: PurchaseDate</para>
/// <para>SF Type: date</para>
/// <para>Nillable: True</para>
///</summary>
[JsonProperty(PropertyName = "purchaseDate")]
public DateTime? PurchaseDate { get; set; }
///<summary>
/// Usage End Date
/// <para>Name: UsageEndDate</para>
/// <para>SF Type: date</para>
/// <para>Nillable: True</para>
///</summary>
[JsonProperty(PropertyName = "usageEndDate")]
public DateTime? UsageEndDate { get; set; }
///<summary>
/// Status
/// <para>Name: Status</para>
/// <para>SF Type: picklist</para>
/// <para>Nillable: True</para>
///</summary>
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }
///<summary>
/// Price
/// <para>Name: Price</para>
/// <para>SF Type: currency</para>
/// <para>Nillable: True</para>
///</summary>
[JsonProperty(PropertyName = "price")]
public decimal? Price { get; set; }
///<summary>
/// Quantity
/// <para>Name: Quantity</para>
/// <para>SF Type: double</para>
/// <para>Nillable: True</para>
///</summary>
[JsonProperty(PropertyName = "quantity")]
public double? Quantity { get; set; }
///<summary>
/// Description
/// <para>Name: Description</para>
/// <para>SF Type: textarea</para>
/// <para>Nillable: True</para>
///</summary>
[JsonProperty(PropertyName = "description")]
public string Description { get; set; }
///<summary>
/// Owner ID
/// <para>Name: OwnerId</para>
/// <para>SF Type: reference</para>
/// <para>Nillable: False</para>
///</summary>
[JsonProperty(PropertyName = "ownerId")]
public string OwnerId { get; set; }
///<summary>
/// ReferenceTo: User
/// <para>RelationshipName: Owner</para>
///</summary>
[JsonProperty(PropertyName = "owner")]
[Updateable(false), Createable(false)]
public SfUser Owner { get; set; }
///<summary>
/// Asset Provided By ID
/// <para>Name: AssetProvidedById</para>
/// <para>SF Type: reference</para>
/// <para>Nillable: True</para>
///</summary>
[JsonProperty(PropertyName = "assetProvidedById")]
public string AssetProvidedById { get; set; }
///<summary>
/// ReferenceTo: Account
/// <para>RelationshipName: AssetProvidedBy</para>
///</summary>
[JsonProperty(PropertyName = "assetProvidedBy")]
[Updateable(false), Createable(false)]
public SfAccount AssetProvidedBy { get; set; }
///<summary>
/// Asset Serviced By ID
/// <para>Name: AssetServicedById</para>
/// <para>SF Type: reference</para>
/// <para>Nillable: True</para>
///</summary>
[JsonProperty(PropertyName = "assetServicedById")]
public string AssetServicedById { get; set; }
///<summary>
/// ReferenceTo: Account
/// <para>RelationshipName: AssetServicedBy</para>
///</summary>
[JsonProperty(PropertyName = "assetServicedBy")]
[Updateable(false), Createable(false)]
public SfAccount AssetServicedBy { get; set; }
///<summary>
/// Internal Asset
/// <para>Name: IsInternal</para>
/// <para>SF Type: boolean</para>
/// <para>Nillable: False</para>
///</summary>
[JsonProperty(PropertyName = "isInternal")]
public bool? IsInternal { get; set; }
///<summary>
/// Asset Level
/// <para>Name: AssetLevel</para>
/// <para>SF Type: int</para>
/// <para>Nillable: True</para>
///</summary>
[JsonProperty(PropertyName = "assetLevel")]
[Updateable(false), Createable(false)]
public int? AssetLevel { get; set; }
///<summary>
/// Product SKU
/// <para>Name: StockKeepingUnit</para>
/// <para>SF Type: string</para>
/// <para>Nillable: True</para>
///</summary>
[JsonProperty(PropertyName = "stockKeepingUnit")]
[Updateable(false), Createable(false)]
public string StockKeepingUnit { get; set; }
///<summary>
/// Last Viewed Date
/// <para>Name: LastViewedDate</para>
/// <para>SF Type: datetime</para>
/// <para>Nillable: True</para>
///</summary>
[JsonProperty(PropertyName = "lastViewedDate")]
[Updateable(false), Createable(false)]
public DateTimeOffset? LastViewedDate { get; set; }
///<summary>
/// Last Referenced Date
/// <para>Name: LastReferencedDate</para>
/// <para>SF Type: datetime</para>
/// <para>Nillable: True</para>
///</summary>
[JsonProperty(PropertyName = "lastReferencedDate")]
[Updateable(false), Createable(false)]
public DateTimeOffset? LastReferencedDate { get; set; }
}
}