-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
922 lines (785 loc) · 25.5 KB
/
types.go
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
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
package lwapi
import (
"net/http"
"time"
)
type Error struct {
ErrorCode string `json:"errorCode"`
ErrorMessage string `json:"errorMessage"`
CorrelationID string `json:"correlationId"`
UserMessage string `json:"userMessage"`
Reference string `json:"reference"`
}
type VSApi struct {
BaseURL string
conn *http.Client
Token string
ServiceType string
}
type AbuseApi struct {
BaseURL string
conn *http.Client
Token string
ServiceType string
}
type DSApi struct {
BaseURL string
conn *http.Client
Token string
ServiceType string
}
type Token struct {
Token string
}
type Metadata struct {
Limit int `json:"limit"`
Offset int `json:"offset"`
TotalCount int `json:"totalCount"`
}
type Contract struct {
CustomerID string `json:"customerId"`
DeliveryStatus string `json:"deliveryStatus"`
ID string `json:"id"`
Reference string `json:"reference"`
SalesOrgID string `json:"salesOrgId"`
}
type FeatureAvailability struct {
Automation bool `json:"automation"`
IpmiReboot bool `json:"ipmiReboot"`
PowerCycle bool `json:"powerCycle"`
PrivateNetwork bool `json:"privateNetwork"`
RemoteManagement bool `json:"remoteManagement"`
}
type Location struct {
Rack string `json:"rack"`
Site string `json:"site"`
Suite string `json:"suite"`
Unit string `json:"unit"`
}
type Port struct {
Name string `json:"name"`
Port string `json:"port"`
}
type InterfaceParams struct {
Gateway string `json:"gateway"`
IP string `json:"ip"`
Mac string `json:"mac"`
Ports []Port `json:"ports"`
}
type NetworkInterfaces struct {
Internal InterfaceParams `json:"internal"`
Public InterfaceParams `json:"public"`
RemoteManagement InterfaceParams `json:"remoteManagement"`
}
type PowerPort struct {
Name string `json:"name"`
Port string `json:"port"`
}
type PrivateNetwork struct {
ID string `json:"id"`
LinkSpeed int `json:"linkSpeed"`
Status string `json:"status"`
Subnet string `json:"subnet"`
VlanID string `json:"vlanId"`
}
type Rack struct {
Type string `json:"type"`
}
type Servers struct {
Metadata Metadata `json:"_metadata"`
Servers []Server `json:"servers"`
Error
}
type Server struct {
AssetID string `json:"assetId"`
Contract Contract `json:"contract"`
FeatureAvailability FeatureAvailability `json:"featureAvailability,omitempty"`
ID string `json:"id"`
Location Location `json:"location"`
NetworkInterfaces NetworkInterfaces `json:"networkInterfaces"`
PowerPorts []PowerPort `json:"powerPorts,omitempty"`
PrivateNetworks []PrivateNetwork `json:"privateNetworks"`
Rack Rack `json:"rack"`
Error
}
type Reference struct {
Reference string `json:"reference"`
}
type Firmware struct {
Date string `json:"date"`
Description string `json:"description"`
Vendor string `json:"vendor"`
Version string `json:"version"`
}
type Motherboard struct {
Product string `json:"product"`
Serial string `json:"serial"`
Vendor string `json:"vendor"`
}
type HardwareChassis struct {
Description string `json:"description"`
Firmware Firmware `json:"firmware"`
Motherboard Motherboard `json:"motherboard"`
Product string `json:"product"`
Serial string `json:"serial"`
Vendor string `json:"vendor"`
}
type CPUCapabilities struct {
Cpufreq string `json:"cpufreq"`
Ht string `json:"ht"`
Vmx bool `json:"vmx"`
X8664 string `json:"x86-64"`
}
type CPUSettings struct {
Cores string `json:"cores"`
Enabledcores string `json:"enabledcores"`
Threads string `json:"threads"`
}
type CPU struct {
Capabilities CPUCapabilities `json:"capabilities"`
Description string `json:"description"`
Hz string `json:"hz"`
SerialNumber string `json:"serial_number"`
Settings CPUSettings `json:"settings"`
Slot string `json:"slot"`
Vendor string `json:"vendor"`
}
type HardwareInformation struct {
ID string `json:"id"`
ParserVersion string `json:"parserVersion"`
Result HardwareInformationResult `json:"result"`
ScannedAt time.Time `json:"scannedAt"`
ServerID string `json:"serverId"`
Error
}
type HardwareInformationResult struct {
Chassis HardwareChassis `json:"chassis"`
CPU []CPU `json:"cpu"`
Disks []Disk `json:"disks"`
Ipmi IPMI `json:"ipmi"`
Memory []Memory `json:"memory"`
Network []Network `json:"network"`
}
type Disk struct {
Description string `json:"description"`
ID string `json:"id"`
Product string `json:"product"`
SerialNumber string `json:"serial_number"`
Size string `json:"size"`
Smartctl Smartctl `json:"smartctl"`
Vendor string `json:"vendor"`
}
type Smartctl struct {
AtaVersion string `json:"ata_version"`
Attributes SmartctlAttributes `json:"attributes"`
DeviceModel string `json:"device_model"`
ExecutionStatus string `json:"execution_status"`
FirmwareVersion string `json:"firmware_version"`
IsSas bool `json:"is_sas"`
OverallHealth string `json:"overall_health"`
Rpm string `json:"rpm"`
SataVersion string `json:"sata_version"`
SectorSize string `json:"sector_size"`
SerialNumber string `json:"serial_number"`
SmartErrorLog string `json:"smart_error_log"`
SmartSupport SmartSupport `json:"smart_support"`
SmartctlVersion string `json:"smartctl_version"`
UserCapacity string `json:"user_capacity"`
}
type SmartctlAttributes struct {
PowerOnHours PowerOnHours `json:"Power_On_Hours"`
ReallocatedSectorCt ReallocatedSectorCt `json:"Reallocated_Sector_Ct"`
}
type PowerOnHours struct {
Flag string `json:"flag"`
ID string `json:"id"`
RawValue string `json:"raw_value"`
Thresh string `json:"thresh"`
Type string `json:"type"`
Updated string `json:"updated"`
Value string `json:"value"`
WhenFailed string `json:"when_failed"`
Worst string `json:"worst"`
}
type ReallocatedSectorCt struct {
Flag string `json:"flag"`
ID string `json:"id"`
RawValue string `json:"raw_value"`
Thresh string `json:"thresh"`
Type string `json:"type"`
Updated string `json:"updated"`
Value string `json:"value"`
WhenFailed string `json:"when_failed"`
Worst string `json:"worst"`
}
type SmartSupport struct {
Available bool `json:"available"`
Enabled bool `json:"enabled"`
}
type IPMI struct {
Defgateway string `json:"defgateway"`
Firmware string `json:"firmware"`
Ipaddress string `json:"ipaddress"`
Ipsource string `json:"ipsource"`
Macaddress string `json:"macaddress"`
Subnetmask string `json:"subnetmask"`
Vendor string `json:"vendor"`
}
type Memory struct {
ClockHz string `json:"clock_hz"`
Description string `json:"description"`
ID string `json:"id"`
SerialNumber string `json:"serial_number"`
SizeBytes string `json:"size_bytes"`
}
type Network struct {
Capabilities NetworkCapabilities `json:"capabilities"`
Lldp Lldp `json:"lldp"`
LogicalName string `json:"logical_name"`
MacAddress string `json:"mac_address"`
Product string `json:"product"`
Settings Settings `json:"settings"`
Vendor string `json:"vendor"`
}
type NetworkCapabilities struct {
Autonegotiation string `json:"autonegotiation"`
BusMaster string `json:"bus_master"`
CapList string `json:"cap_list"`
Ethernet string `json:"ethernet"`
LinkSpeeds interface{} `json:"link_speeds"`
Msi string `json:"msi"`
Msix string `json:"msix"`
Pciexpress string `json:"pciexpress"`
Physical string `json:"physical"`
Pm string `json:"pm"`
Tp string `json:"tp"`
}
type Lldp struct {
Chassis LldpChassis `json:"chassis"`
Port LldpPort `json:"port"`
Vlan LldpVlan `json:"vlan"`
}
type LldpPort struct {
AutoNegotiation AutoNegotiation `json:"auto_negotiation"`
Description string `json:"description"`
}
type LldpChassis struct {
Description string `json:"description"`
MacAddress string `json:"mac_address"`
Name string `json:"name"`
}
type AutoNegotiation struct {
Enabled string `json:"enabled"`
Supported string `json:"supported"`
}
type LldpVlan struct {
ID string `json:"id"`
Label string `json:"label"`
Name string `json:"name"`
}
type Settings struct {
Autonegotiation string `json:"autonegotiation"`
Broadcast string `json:"broadcast"`
Driver string `json:"driver"`
Driverversion string `json:"driverversion"`
Duplex string `json:"duplex"`
Firmware string `json:"firmware"`
IP string `json:"ip"`
Latency string `json:"latency"`
Link string `json:"link"`
Multicast string `json:"multicast"`
Port string `json:"port"`
Speed string `json:"speed"`
}
type DDoS struct {
DetectionProfile string `json:"detectionProfile"`
ProtectionType string `json:"protectionType"`
}
type ServerIP struct {
Ddos DDoS `json:"ddos"`
FloatingIP bool `json:"floatingIp"`
Gateway string `json:"gateway"`
IP string `json:"ip"`
MainIP bool `json:"mainIp"`
NetworkType string `json:"networkType"`
NullRouted bool `json:"nullRouted"`
ReverseLookup string `json:"reverseLookup"`
Version int `json:"version"`
Error
}
type ServerIPs struct {
Metadata Metadata `json:"_metadata"`
Ips []ServerIP `json:"ips"`
Error
}
type UpdateIPRequest struct {
// DetectionProfile one of "ADVANCED_DEFAULT" "ADVANCED_LOW_UDP" "ADVANCED_MED_UDP"
DetectionProfile string `json:"detectionProfile"`
ReverseLookup string `json:"reverseLookup"`
}
type NullHistory struct {
Metadata Metadata `json:"_metadata"`
NullRoutes []NullRoute `json:"nullRoutes"`
Error
}
type NullRoute struct {
AutomatedUnnullingAt time.Time `json:"automatedUnnullingAt"`
Comment string `json:"comment"`
IP string `json:"ip"`
NullLevel int `json:"nullLevel"`
NulledAt time.Time `json:"nulledAt"`
}
type NetworkInterfacesList struct {
Metadata Metadata `json:"_metadata"`
NetworkInterfaces []NetworkInterface `json:"networkInterfaces"`
Error
}
type NetworkInterface struct {
LinkSpeed string `json:"linkSpeed"`
OperStatus string `json:"operStatus"`
Status string `json:"status"`
SwitchInterface string `json:"switchInterface"`
SwitchName string `json:"switchName"`
Type string `json:"type"`
}
type LinkSpeed struct {
LinkSpeed int `json:"linkSpeed"`
}
type ServerDHCPLeases struct {
Metadata Metadata `json:"_metadata"`
Leases []ServerDHCPLease `json:"leases"`
Error
}
type ServerDHCPLease struct {
Bootfile string `json:"bootfile"`
CreatedAt time.Time `json:"createdAt"`
Gateway string `json:"gateway"`
Hostname string `json:"hostname"`
IP string `json:"ip"`
LastClientRequest LastClientRequest `json:"lastClientRequest"`
Mac string `json:"mac"`
Netmask string `json:"netmask"`
Site string `json:"site"`
UpdatedAt time.Time `json:"updatedAt"`
}
type LastClientRequest struct {
RelayAgent interface{} `json:"relayAgent"`
Type string `json:"type"`
UserAgent string `json:"userAgent"`
}
type ServerDHCPLeaseNew struct {
Bootfile string `json:"bootfile"`
Hostname string `json:"hostname,omitempty"`
}
type Job struct {
CreatedAt string `json:"createdAt"`
Flow string `json:"flow"`
IsRunning bool `json:"isRunning"`
Node string `json:"node"`
Payload JobPayload `json:"payload"`
Progress JobProgress `json:"progress"`
ServerID string `json:"serverId"`
Status string `json:"status"`
Tasks []Task `json:"tasks"`
Type string `json:"type"`
UpdatedAt string `json:"updatedAt"`
UUID string `json:"uuid"`
}
type JobPayload struct {
Configurable bool `json:"configurable"`
Device string `json:"device"`
FileserverBaseURL string `json:"fileserverBaseUrl"`
JobType string `json:"jobType"`
NumberOfDisks interface{} `json:"numberOfDisks"`
OperatingSystemID string `json:"operatingSystemId"`
Os PayloadOS `json:"os"`
Partitions []PayloadPartitions `json:"partitions"`
Pop string `json:"pop"`
PowerCycle bool `json:"powerCycle"`
RaidLevel interface{} `json:"raidLevel"`
ServerID string `json:"serverId"`
Timezone string `json:"timezone"`
X int `json:"x"`
}
type PayloadPartitions struct {
Filesystem string `json:"filesystem"`
Size int `json:"size"`
}
type StatusTimestamps struct {
Canceled time.Time `json:"CANCELED"`
Pending time.Time `json:"PENDING"`
Waiting time.Time `json:"WAITING"`
}
type JobProgress struct {
Canceled int `json:"canceled"`
Expired int `json:"expired"`
Failed int `json:"failed"`
Finished int `json:"finished"`
Inprogress int `json:"inprogress"`
Pending int `json:"pending"`
Percentage int `json:"percentage"`
Total int `json:"total"`
Waiting int `json:"waiting"`
}
type PayloadOS struct {
Architecture string `json:"architecture"`
Family string `json:"family"`
Name string `json:"name"`
Type string `json:"type"`
Version string `json:"version"`
}
type Task struct {
Description string `json:"description"`
ErrorMessage string `json:"errorMessage"`
Flow string `json:"flow"`
OnError string `json:"onError"`
Status string `json:"status"`
StatusTimestamps StatusTimestamps `json:"statusTimestamps"`
UUID string `json:"uuid"`
}
type HardwareScanJob struct {
PowerCycle bool `json:"powerCycle"`
CallbackUrl string `json:"callbackUrl"`
}
type InstallationJob struct {
ControlPanelID string `json:"controlPanelId,omitempty"`
Device string `json:"device,omitempty"`
Hostname string `json:"hostname,omitempty"`
OperatingSystemID string `json:"operatingSystemId"`
Partitions []Partition `json:"partitions,omitempty"`
SSHKeys string `json:"sshKeys,omitempty"`
}
type Partition struct {
Bootable bool `json:"bootable,omitempty"`
Filesystem string `json:"filesystem"`
Mountpoint string `json:"mountpoint,omitempty"`
Primary bool `json:"primary,omitempty"`
Size string `json:"size"`
}
type CallbackURL struct {
CallbackURL string `json:"callbackUrl"`
}
type Jobs struct {
Metadata Metadata `json:"_metadata"`
Jobs []Job `json:"jobs"`
Error
}
type RescueModeJob struct {
CallbackURL string `json:"callbackUrl,omitempty"`
PowerCycle bool `json:"powerCycle,omitempty"`
RescueImageID string `json:"rescueImageId"`
SSHKeys string `json:"sshKeys,omitempty"`
Error
}
type Credentials struct {
Metadata Metadata `json:"_metadata"`
Credentials []Credential `json:"credentials"`
Error
}
type Credential struct {
Type string `json:"type"`
Username string `json:"username"`
Password string `json:"password"`
Error
}
type Password struct {
Password string `json:"password"`
}
type MetricsMetadata struct {
Aggregation string `json:"aggregation"`
From time.Time `json:"from"`
Granularity string `json:"granularity"`
To time.Time `json:"to"`
}
type Metrics struct {
Metadata MetricsMetadata `json:"_metadata"`
Metrics Metric `json:"metrics"`
Error
}
type Metric struct {
DownPublic MetricsValues `json:"DOWN_PUBLIC"`
UpPublic MetricsValues `json:"UP_PUBLIC"`
}
type MetricsValues struct {
Unit string `json:"unit"`
Values []MetricsValue `json:"values"`
}
type MetricsValue struct {
Timestamp time.Time `json:"timestamp"`
Value int `json:"value"`
}
type BandwidthNotification struct {
Metadata Metadata `json:"_metadata"`
BandwidthNotificationSettings []NotificationSetting `json:"bandwidthNotificationSettings"`
}
type DatatrafficNotification struct {
Metadata Metadata `json:"_metadata"`
DatatrafficNotificationSettings []NotificationSetting `json:"datatrafficNotificationSettings"`
}
type Action struct {
LastTriggeredAt time.Time `json:"lastTriggeredAt"`
Type string `json:"type"`
}
type NotificationSetting struct {
Actions []Action `json:"actions"`
Frequency string `json:"frequency"`
ID string `json:"id"`
LastCheckedAt time.Time `json:"lastCheckedAt"`
Threshold string `json:"threshold"`
ThresholdExceededAt time.Time `json:"thresholdExceededAt"`
Unit string `json:"unit"`
}
type NotificationRequest struct {
Frequency string `json:"frequency"`
Threshold string `json:"threshold"`
Unit string `json:"unit"`
}
type DataTrafficNotificationRequest struct {
Frequency string `json:"frequency"`
Threshold string `json:"threshold"`
Unit string `json:"unit"`
}
type NotificationResponse struct {
Actions []Action `json:"actions"`
Frequency string `json:"frequency"`
ID string `json:"id"`
LastCheckedAt time.Time `json:"lastCheckedAt"`
Threshold string `json:"threshold"`
ThresholdExceededAt time.Time `json:"thresholdExceededAt"`
Unit string `json:"unit"`
Error
}
type DDoSStatus struct {
Nulling string `json:"nulling"`
Scrubbing string `json:"scrubbing"`
Error
}
type PowerStatus struct {
Ipmi IPMIPowerStatus `json:"ipmi"`
Pdu PduPowerStatus `json:"pdu"`
Error
}
type IPMIPowerStatus struct {
Status string `json:"status"`
}
type PduPowerStatus struct {
Status string `json:"status"`
}
type OperatingSystems struct {
Metadata Metadata `json:"_metadata"`
OperatingSystems []OperatingSystem `json:"operatingSystems"`
Error
}
type OperatingSystem struct {
ID string `json:"id"`
Name string `json:"name"`
}
type OSParams struct {
Architecture string `json:"architecture"`
Configurable bool `json:"configurable"`
Defaults OSParamsDefaults `json:"defaults"`
Family string `json:"family"`
Features []string `json:"features"`
ID string `json:"id"`
Name string `json:"name"`
SupportedBootDevices []string `json:"supportedBootDevices"`
SupportedFileSystems []string `json:"supportedFileSystems"`
Type string `json:"type"`
Version string `json:"version"`
Error
}
type OSParamsDefaults struct {
Device string `json:"device"`
Partitions []Partition `json:"partitions"`
}
type ControlPanels struct {
Metadata Metadata `json:"_metadata"`
ControlPanels []ControlPanel `json:"controlPanels"`
Error
}
type ControlPanel struct {
ID string `json:"id"`
Name string `json:"name"`
}
type RescueImages struct {
Metadata Metadata `json:"_metadata"`
RescueImages []RescueImage `json:"rescueImages"`
Error
}
type RescueImage struct {
ID string `json:"id"`
Name string `json:"name"`
}
type NetworkType string
type CredType string
type ControlPanelID int
type VirtualCredType string
type BandwidthMetrics struct {
From string
To string
Aggregation string
Granularity string
}
type DatatrafficMetrics struct {
From string
To string
Aggregation string
Granularity string
}
type VirtualServers struct {
VirtualServers []VirtualServer `json:"virtualServers"`
Metadata Metadata `json:"_metadata"`
Error
}
type VirtualServer struct {
ID string `json:"id"`
Reference string `json:"reference"`
CustomerID string `json:"customerId"`
DataCenter string `json:"dataCenter"`
CloudServerID interface{} `json:"cloudServerId"`
State string `json:"state"`
FirewallState string `json:"firewallState"`
Template string `json:"template"`
ServiceOffering string `json:"serviceOffering"`
SLA string `json:"sla"`
Contract VirtualServerContract `json:"contract"`
Hardware VirtualServerHardware `json:"hardware"`
Iso ISO `json:"iso"`
Ips []VirtualServerIP `json:"ips"`
Error
}
type ISO struct {
ID string `json:"id"`
Name string `json:"name"`
DisplayName string `json:"displayName"`
}
type VirtualServerIP struct {
IP string `json:"ip"`
Version int `json:"version"`
Type string `json:"type"`
}
type VirtualServerContract struct {
ID string `json:"id"`
StartsAt string `json:"startsAt"`
EndsAt string `json:"endsAt"`
BillingCycle int `json:"billingCycle"`
BillingFrequency string `json:"billingFrequency"`
PricePerFrequency float64 `json:"pricePerFrequency"`
Currency string `json:"currency"`
}
type VirtualServerCPU struct {
Cores int `json:"cores"`
}
type VirtualServerMemory struct {
Unit string `json:"unit"`
Amount int `json:"amount"`
}
type VirtualServerStorage struct {
Unit string `json:"unit"`
Amount int `json:"amount"`
}
type VirtualServerHardware struct {
CPU VirtualServerCPU `json:"cpu"`
Memory VirtualServerMemory `json:"memory"`
Storage VirtualServerStorage `json:"storage"`
}
type OperatingSystemID struct {
OperatingSystemID string `json:"operatingSystemId"`
}
type VirtualServerCredentialUpdate struct {
Username string `json:"username"`
Password string `json:"password"`
Type string `json:"type"`
}
type VirtualServerDatatraficMetrics struct {
Metadata MetricsMetadata `json:"_metadata"`
Metrics VirtualServerDatatraficMetric `json:"metrics"`
}
type Datatraffic struct {
Unit string `json:"unit"`
Values []struct {
Timestamp time.Time `json:"timestamp"`
Value int `json:"value"`
} `json:"values"`
}
type VirtualServerDatatraficMetric struct {
DatatrafficUp Datatraffic `json:"DATATRAFFIC_UP"`
DatatrafficDown Datatraffic `json:"DATATRAFFIC_DOWN"`
}
type Templates struct {
Metadata Metadata `json:"_metadata"`
Templates []Template `json:"templates"`
}
type Template struct {
ID string `json:"id"`
Name string `json:"name"`
}
type Message struct {
Body string `json:"body"`
}
type Messages struct {
Messages []struct {
PostedBy string `json:"postedBy"`
PostedAt time.Time `json:"postedAt"`
Body string `json:"body"`
Attachment struct {
ID string `json:"id"`
MimeType string `json:"mimeType"`
Filename string `json:"filename"`
} `json:"attachment,omitempty"`
} `json:"messages"`
Metadata Metadata `json:"_metadata"`
}
type Reports struct {
Reports []ReportShort `json:"reports"`
Metadata Metadata `json:"_metadata"`
}
type ReportShort struct {
ID string `json:"id"`
Subject string `json:"subject"`
Status string `json:"status"`
ReportedAt time.Time `json:"reportedAt"`
UpdatedAt time.Time `json:"updatedAt"`
Notifier string `json:"notifier"`
CustomerID string `json:"customerId"`
LegalEntityID string `json:"legalEntityId"`
Deadline time.Time `json:"deadline"`
}
type Report struct {
ID string `json:"id"`
Subject string `json:"subject"`
Status string `json:"status"`
AbuseType string `json:"abuseType"`
Reopened bool `json:"reopened"`
ReportedAt string `json:"reportedAt"`
UpdatedAt string `json:"updatedAt"`
Notifier string `json:"notifier"`
CustomerID string `json:"customerId"`
LegalEntityID string `json:"legalEntityId"`
Body string `json:"body"`
Deadline string `json:"deadline"`
DetectedIPAddresses []string `json:"detectedIpAddresses"`
DetectedDomainNames []struct {
Name string `json:"name"`
IPAddresses []string `json:"ipAddresses"`
} `json:"detectedDomainNames"`
Attachments []struct {
ID string `json:"id"`
MimeType string `json:"mimeType"`
Filename string `json:"filename"`
} `json:"attachments"`
TotalMessagesCount int `json:"totalMessagesCount"`
LatestMessages []struct {
PostedBy string `json:"postedBy"`
PostedAt time.Time `json:"postedAt"`
Body string `json:"body"`
Attachment struct {
ID string `json:"id"`
MimeType string `json:"mimeType"`
Filename string `json:"filename"`
} `json:"attachment,omitempty"`
} `json:"latestMessages"`
}
type Resolutions struct {
Resolutions []string `json:"resolutions"`
}