-
Notifications
You must be signed in to change notification settings - Fork 5
/
HGI.Item.pas
179 lines (159 loc) · 5.56 KB
/
HGI.Item.pas
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
unit HGI.Item;
interface
uses
Generics.Collections, Rest.Json;
type
TBasicItem = class
private
FId: string;
FName: string;
public
property Id: string read FId write FId;
property Name: string read FName write FName;
end;
TActionParameter = class
private
FParameter: string;
public
property Parameter: string read FParameter write FParameter;
end;
TPackageAction = class
private
FActionId: string;
FActionName: string;
FDescription: string;
FId: string;
FParameter: TArray<TActionParameter>;
FRequireElevation: string;
FType: string;
public
property ActionId: string read FActionId write FActionId;
property ActionName: string read FActionName write FActionName;
property Description: string read FDescription write FDescription;
property Id: string read FId write FId;
property Parameter: TArray<TActionParameter> read FParameter write FParameter;
property RequireElevation: string read FRequireElevation write FRequireElevation;
property &Type: string read FType write FType;
destructor Destroy; override;
end;
TProductVersion = class(TBasicItem);
TLibOS = class(TBasicItem);
TLibPlatform = class(TBasicItem);
TCategory = class(TBasicItem);
TGetItPackage = class
private
FActions: TArray<TPackageAction>;
FAllUsers: string;
FCategories: TArray<TCategory>;
FCompatibility: string;
FDescription: string;
FIcon: string;
FId: string;
FImage: string;
FLibAkamaiUrl: string;
FLibCloudfrontUrl: string;
FLibCode: string;
FLibCodeName: string;
FLibGenerateTmpUrl: string;
FLibLicense: string;
FLibLicenseName: string;
FLibOSes: TArray<TLibOS>;
FLibPlatforms: TArray<TLibPlatform>;
FLibProjectUrl: string;
FLibSignAkamaiUrl: string;
FLibSignCloudfrontUrl: string;
FLibSize: string;
FLibUrl: string;
FLibUrlProvider: string;
FLicenseState: string;
FModified: string;
FName: string;
FProductVersions: TArray<TProductVersion>;
FPurchaseUrl: string;
FRequireElevation: string;
FState: string;
FTags: string;
FTargetPath: string;
FTypeDescription: string;
FTypeId: string;
FVendor: string;
FVendorUrl: string;
FVersion: string;
public
property Actions: TArray<TPackageAction> read FActions write FActions;
property AllUsers: string read FAllUsers write FAllUsers;
property Categories: TArray<TCategory> read FCategories write FCategories;
property Compatibility: string read FCompatibility write FCompatibility;
property Description: string read FDescription write FDescription;
property Icon: string read FIcon write FIcon;
property Id: string read FId write FId;
property Image: string read FImage write FImage;
property LibAkamaiUrl: string read FLibAkamaiUrl write FLibAkamaiUrl;
property LibCloudfrontUrl: string read FLibCloudfrontUrl write FLibCloudfrontUrl;
property LibCode: string read FLibCode write FLibCode;
property LibCodeName: string read FLibCodeName write FLibCodeName;
property LibGenerateTmpUrl: string read FLibGenerateTmpUrl write FLibGenerateTmpUrl;
property LibLicense: string read FLibLicense write FLibLicense;
property LibLicenseName: string read FLibLicenseName write FLibLicenseName;
property LibOSes: TArray<TLibOS> read FLibOSes write FLibOSes;
property LibPlatforms: TArray<TLibPlatform> read FLibPlatforms write FLibPlatforms;
property LibProjectUrl: string read FLibProjectUrl write FLibProjectUrl;
property LibSignAkamaiUrl: string read FLibSignAkamaiUrl write FLibSignAkamaiUrl;
property LibSignCloudfrontUrl: string read FLibSignCloudfrontUrl write FLibSignCloudfrontUrl;
property LibSize: string read FLibSize write FLibSize;
property LibUrl: string read FLibUrl write FLibUrl;
property LibUrlProvider: string read FLibUrlProvider write FLibUrlProvider;
property LicenseState: string read FLicenseState write FLicenseState;
property Modified: string read FModified write FModified;
property Name: string read FName write FName;
property ProductVersions: TArray<TProductVersion> read FProductVersions write FProductVersions;
property PurchaseUrl: string read FPurchaseUrl write FPurchaseUrl;
property RequireElevation: string read FRequireElevation write FRequireElevation;
property State: string read FState write FState;
property Tags: string read FTags write FTags;
property TargetPath: string read FTargetPath write FTargetPath;
property TypeDescription: string read FTypeDescription write FTypeDescription;
property TypeId: string read FTypeId write FTypeId;
property Vendor: string read FVendor write FVendor;
property VendorUrl: string read FVendorUrl write FVendorUrl;
property Version: string read FVersion write FVersion;
destructor Destroy; override;
end;
TPackages = class
private
FItems: TArray<TGetItPackage>;
public
property Items: TArray<TGetItPackage> read FItems write FItems;
destructor Destroy; override;
end;
implementation
{ TPackageAction }
destructor TPackageAction.Destroy;
begin
for var Item in FParameter do
Item.Free;
inherited;
end;
{ TGetItPackage }
destructor TGetItPackage.Destroy;
begin
for var Item in FCategories do
Item.Free;
for var Item in FLibPlatforms do
Item.Free;
for var Item in FLibOSes do
Item.Free;
for var Item in FProductVersions do
Item.Free;
for var Item in FActions do
Item.Free;
inherited;
end;
{ TPackages }
destructor TPackages.Destroy;
begin
for var Item in FItems do
Item.Free;
inherited;
end;
end.