-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtypes.go
1046 lines (902 loc) · 23.1 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
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// This file was auto-generated by Fern from our API Definition.
package zep
import (
json "encoding/json"
fmt "fmt"
internal "github.com/getzep/zep-go/v2/internal"
)
type APIError struct {
Message *string `json:"message,omitempty" url:"message,omitempty"`
extraProperties map[string]interface{}
rawJSON json.RawMessage
}
func (a *APIError) GetMessage() *string {
if a == nil {
return nil
}
return a.Message
}
func (a *APIError) GetExtraProperties() map[string]interface{} {
return a.extraProperties
}
func (a *APIError) UnmarshalJSON(data []byte) error {
type unmarshaler APIError
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*a = APIError(value)
extraProperties, err := internal.ExtractExtraProperties(data, *a)
if err != nil {
return err
}
a.extraProperties = extraProperties
a.rawJSON = json.RawMessage(data)
return nil
}
func (a *APIError) String() string {
if len(a.rawJSON) > 0 {
if value, err := internal.StringifyJSON(a.rawJSON); err == nil {
return value
}
}
if value, err := internal.StringifyJSON(a); err == nil {
return value
}
return fmt.Sprintf("%#v", a)
}
type AddTripleRequest = interface{}
type AddTripleResponse = interface{}
type AddedFact = interface{}
type ApidataFactRatingExamples struct {
High *string `json:"high,omitempty" url:"high,omitempty"`
Low *string `json:"low,omitempty" url:"low,omitempty"`
Medium *string `json:"medium,omitempty" url:"medium,omitempty"`
extraProperties map[string]interface{}
rawJSON json.RawMessage
}
func (a *ApidataFactRatingExamples) GetHigh() *string {
if a == nil {
return nil
}
return a.High
}
func (a *ApidataFactRatingExamples) GetLow() *string {
if a == nil {
return nil
}
return a.Low
}
func (a *ApidataFactRatingExamples) GetMedium() *string {
if a == nil {
return nil
}
return a.Medium
}
func (a *ApidataFactRatingExamples) GetExtraProperties() map[string]interface{} {
return a.extraProperties
}
func (a *ApidataFactRatingExamples) UnmarshalJSON(data []byte) error {
type unmarshaler ApidataFactRatingExamples
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*a = ApidataFactRatingExamples(value)
extraProperties, err := internal.ExtractExtraProperties(data, *a)
if err != nil {
return err
}
a.extraProperties = extraProperties
a.rawJSON = json.RawMessage(data)
return nil
}
func (a *ApidataFactRatingExamples) String() string {
if len(a.rawJSON) > 0 {
if value, err := internal.StringifyJSON(a.rawJSON); err == nil {
return value
}
}
if value, err := internal.StringifyJSON(a); err == nil {
return value
}
return fmt.Sprintf("%#v", a)
}
type ClassifySessionResponse = interface{}
type CommunityNode = interface{}
type DocumentCollectionResponse = interface{}
type DocumentResponse = interface{}
type DocumentSearchResult = interface{}
type DocumentSearchResultPage = interface{}
type EntityEdge struct {
// Creation time of the edge
CreatedAt string `json:"created_at" url:"created_at"`
// List of episode ids that reference these entity edges
Episodes []string `json:"episodes,omitempty" url:"episodes,omitempty"`
// Datetime of when the node was invalidated
ExpiredAt *string `json:"expired_at,omitempty" url:"expired_at,omitempty"`
// Fact representing the edge and nodes that it connects
Fact string `json:"fact" url:"fact"`
// Datetime of when the fact stopped being true
InvalidAt *string `json:"invalid_at,omitempty" url:"invalid_at,omitempty"`
// Name of the edge, relation name
Name string `json:"name" url:"name"`
// UUID of the source node
SourceNodeUUID string `json:"source_node_uuid" url:"source_node_uuid"`
// UUID of the target node
TargetNodeUUID string `json:"target_node_uuid" url:"target_node_uuid"`
// UUID of the edge
UUID string `json:"uuid" url:"uuid"`
// Datetime of when the fact became true
ValidAt *string `json:"valid_at,omitempty" url:"valid_at,omitempty"`
extraProperties map[string]interface{}
rawJSON json.RawMessage
}
func (e *EntityEdge) GetCreatedAt() string {
if e == nil {
return ""
}
return e.CreatedAt
}
func (e *EntityEdge) GetEpisodes() []string {
if e == nil {
return nil
}
return e.Episodes
}
func (e *EntityEdge) GetExpiredAt() *string {
if e == nil {
return nil
}
return e.ExpiredAt
}
func (e *EntityEdge) GetFact() string {
if e == nil {
return ""
}
return e.Fact
}
func (e *EntityEdge) GetInvalidAt() *string {
if e == nil {
return nil
}
return e.InvalidAt
}
func (e *EntityEdge) GetName() string {
if e == nil {
return ""
}
return e.Name
}
func (e *EntityEdge) GetSourceNodeUUID() string {
if e == nil {
return ""
}
return e.SourceNodeUUID
}
func (e *EntityEdge) GetTargetNodeUUID() string {
if e == nil {
return ""
}
return e.TargetNodeUUID
}
func (e *EntityEdge) GetUUID() string {
if e == nil {
return ""
}
return e.UUID
}
func (e *EntityEdge) GetValidAt() *string {
if e == nil {
return nil
}
return e.ValidAt
}
func (e *EntityEdge) GetExtraProperties() map[string]interface{} {
return e.extraProperties
}
func (e *EntityEdge) UnmarshalJSON(data []byte) error {
type unmarshaler EntityEdge
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*e = EntityEdge(value)
extraProperties, err := internal.ExtractExtraProperties(data, *e)
if err != nil {
return err
}
e.extraProperties = extraProperties
e.rawJSON = json.RawMessage(data)
return nil
}
func (e *EntityEdge) String() string {
if len(e.rawJSON) > 0 {
if value, err := internal.StringifyJSON(e.rawJSON); err == nil {
return value
}
}
if value, err := internal.StringifyJSON(e); err == nil {
return value
}
return fmt.Sprintf("%#v", e)
}
type EntityNode struct {
// Creation time of the node
CreatedAt string `json:"created_at" url:"created_at"`
// Labels associated with the node
Labels []string `json:"labels,omitempty" url:"labels,omitempty"`
// Name of the node
Name string `json:"name" url:"name"`
// Regional summary of surrounding edges
Summary string `json:"summary" url:"summary"`
// UUID of the node
UUID string `json:"uuid" url:"uuid"`
extraProperties map[string]interface{}
rawJSON json.RawMessage
}
func (e *EntityNode) GetCreatedAt() string {
if e == nil {
return ""
}
return e.CreatedAt
}
func (e *EntityNode) GetLabels() []string {
if e == nil {
return nil
}
return e.Labels
}
func (e *EntityNode) GetName() string {
if e == nil {
return ""
}
return e.Name
}
func (e *EntityNode) GetSummary() string {
if e == nil {
return ""
}
return e.Summary
}
func (e *EntityNode) GetUUID() string {
if e == nil {
return ""
}
return e.UUID
}
func (e *EntityNode) GetExtraProperties() map[string]interface{} {
return e.extraProperties
}
func (e *EntityNode) UnmarshalJSON(data []byte) error {
type unmarshaler EntityNode
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*e = EntityNode(value)
extraProperties, err := internal.ExtractExtraProperties(data, *e)
if err != nil {
return err
}
e.extraProperties = extraProperties
e.rawJSON = json.RawMessage(data)
return nil
}
func (e *EntityNode) String() string {
if len(e.rawJSON) > 0 {
if value, err := internal.StringifyJSON(e.rawJSON); err == nil {
return value
}
}
if value, err := internal.StringifyJSON(e); err == nil {
return value
}
return fmt.Sprintf("%#v", e)
}
type Episode struct {
Content string `json:"content" url:"content"`
CreatedAt string `json:"created_at" url:"created_at"`
Name *string `json:"name,omitempty" url:"name,omitempty"`
Source *GraphDataType `json:"source,omitempty" url:"source,omitempty"`
SourceDescription *string `json:"source_description,omitempty" url:"source_description,omitempty"`
UUID string `json:"uuid" url:"uuid"`
extraProperties map[string]interface{}
rawJSON json.RawMessage
}
func (e *Episode) GetContent() string {
if e == nil {
return ""
}
return e.Content
}
func (e *Episode) GetCreatedAt() string {
if e == nil {
return ""
}
return e.CreatedAt
}
func (e *Episode) GetName() *string {
if e == nil {
return nil
}
return e.Name
}
func (e *Episode) GetSource() *GraphDataType {
if e == nil {
return nil
}
return e.Source
}
func (e *Episode) GetSourceDescription() *string {
if e == nil {
return nil
}
return e.SourceDescription
}
func (e *Episode) GetUUID() string {
if e == nil {
return ""
}
return e.UUID
}
func (e *Episode) GetExtraProperties() map[string]interface{} {
return e.extraProperties
}
func (e *Episode) UnmarshalJSON(data []byte) error {
type unmarshaler Episode
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*e = Episode(value)
extraProperties, err := internal.ExtractExtraProperties(data, *e)
if err != nil {
return err
}
e.extraProperties = extraProperties
e.rawJSON = json.RawMessage(data)
return nil
}
func (e *Episode) String() string {
if len(e.rawJSON) > 0 {
if value, err := internal.StringifyJSON(e.rawJSON); err == nil {
return value
}
}
if value, err := internal.StringifyJSON(e); err == nil {
return value
}
return fmt.Sprintf("%#v", e)
}
type EpisodeResponse struct {
Episodes []*Episode `json:"episodes,omitempty" url:"episodes,omitempty"`
extraProperties map[string]interface{}
rawJSON json.RawMessage
}
func (e *EpisodeResponse) GetEpisodes() []*Episode {
if e == nil {
return nil
}
return e.Episodes
}
func (e *EpisodeResponse) GetExtraProperties() map[string]interface{} {
return e.extraProperties
}
func (e *EpisodeResponse) UnmarshalJSON(data []byte) error {
type unmarshaler EpisodeResponse
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*e = EpisodeResponse(value)
extraProperties, err := internal.ExtractExtraProperties(data, *e)
if err != nil {
return err
}
e.extraProperties = extraProperties
e.rawJSON = json.RawMessage(data)
return nil
}
func (e *EpisodeResponse) String() string {
if len(e.rawJSON) > 0 {
if value, err := internal.StringifyJSON(e.rawJSON); err == nil {
return value
}
}
if value, err := internal.StringifyJSON(e); err == nil {
return value
}
return fmt.Sprintf("%#v", e)
}
type EpisodeType = interface{}
type Fact struct {
Content string `json:"content" url:"content"`
CreatedAt string `json:"created_at" url:"created_at"`
ExpiredAt *string `json:"expired_at,omitempty" url:"expired_at,omitempty"`
// Deprecated. This field will be removed in the future, please use `content` instead.
Fact string `json:"fact" url:"fact"`
InvalidAt *string `json:"invalid_at,omitempty" url:"invalid_at,omitempty"`
Name *string `json:"name,omitempty" url:"name,omitempty"`
Rating *float64 `json:"rating,omitempty" url:"rating,omitempty"`
SourceNodeName *string `json:"source_node_name,omitempty" url:"source_node_name,omitempty"`
TargetNodeName *string `json:"target_node_name,omitempty" url:"target_node_name,omitempty"`
UUID string `json:"uuid" url:"uuid"`
ValidAt *string `json:"valid_at,omitempty" url:"valid_at,omitempty"`
extraProperties map[string]interface{}
rawJSON json.RawMessage
}
func (f *Fact) GetContent() string {
if f == nil {
return ""
}
return f.Content
}
func (f *Fact) GetCreatedAt() string {
if f == nil {
return ""
}
return f.CreatedAt
}
func (f *Fact) GetExpiredAt() *string {
if f == nil {
return nil
}
return f.ExpiredAt
}
func (f *Fact) GetFact() string {
if f == nil {
return ""
}
return f.Fact
}
func (f *Fact) GetInvalidAt() *string {
if f == nil {
return nil
}
return f.InvalidAt
}
func (f *Fact) GetName() *string {
if f == nil {
return nil
}
return f.Name
}
func (f *Fact) GetRating() *float64 {
if f == nil {
return nil
}
return f.Rating
}
func (f *Fact) GetSourceNodeName() *string {
if f == nil {
return nil
}
return f.SourceNodeName
}
func (f *Fact) GetTargetNodeName() *string {
if f == nil {
return nil
}
return f.TargetNodeName
}
func (f *Fact) GetUUID() string {
if f == nil {
return ""
}
return f.UUID
}
func (f *Fact) GetValidAt() *string {
if f == nil {
return nil
}
return f.ValidAt
}
func (f *Fact) GetExtraProperties() map[string]interface{} {
return f.extraProperties
}
func (f *Fact) UnmarshalJSON(data []byte) error {
type unmarshaler Fact
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*f = Fact(value)
extraProperties, err := internal.ExtractExtraProperties(data, *f)
if err != nil {
return err
}
f.extraProperties = extraProperties
f.rawJSON = json.RawMessage(data)
return nil
}
func (f *Fact) String() string {
if len(f.rawJSON) > 0 {
if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
return value
}
}
if value, err := internal.StringifyJSON(f); err == nil {
return value
}
return fmt.Sprintf("%#v", f)
}
type FactRatingExamples struct {
High *string `json:"high,omitempty" url:"high,omitempty"`
Low *string `json:"low,omitempty" url:"low,omitempty"`
Medium *string `json:"medium,omitempty" url:"medium,omitempty"`
extraProperties map[string]interface{}
rawJSON json.RawMessage
}
func (f *FactRatingExamples) GetHigh() *string {
if f == nil {
return nil
}
return f.High
}
func (f *FactRatingExamples) GetLow() *string {
if f == nil {
return nil
}
return f.Low
}
func (f *FactRatingExamples) GetMedium() *string {
if f == nil {
return nil
}
return f.Medium
}
func (f *FactRatingExamples) GetExtraProperties() map[string]interface{} {
return f.extraProperties
}
func (f *FactRatingExamples) UnmarshalJSON(data []byte) error {
type unmarshaler FactRatingExamples
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*f = FactRatingExamples(value)
extraProperties, err := internal.ExtractExtraProperties(data, *f)
if err != nil {
return err
}
f.extraProperties = extraProperties
f.rawJSON = json.RawMessage(data)
return nil
}
func (f *FactRatingExamples) String() string {
if len(f.rawJSON) > 0 {
if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
return value
}
}
if value, err := internal.StringifyJSON(f); err == nil {
return value
}
return fmt.Sprintf("%#v", f)
}
type FactRatingInstruction struct {
// Examples is a list of examples that demonstrate how facts might be rated based on your instruction. You should provide
// an example of a highly rated example, a low rated example, and a medium (or in between example). For example, if you are rating
// based on relevance to a trip planning application, your examples might be:
// High: "Joe's dream vacation is Bali"
// Medium: "Joe has a fear of flying",
// Low: "Joe's favorite food is Japanese",
Examples *FactRatingExamples `json:"examples,omitempty" url:"examples,omitempty"`
// A string describing how to rate facts as they apply to your application. A trip planning application may
// use something like "relevancy to planning a trip, the user's preferences when traveling,
// or the user's travel history."
Instruction *string `json:"instruction,omitempty" url:"instruction,omitempty"`
extraProperties map[string]interface{}
rawJSON json.RawMessage
}
func (f *FactRatingInstruction) GetExamples() *FactRatingExamples {
if f == nil {
return nil
}
return f.Examples
}
func (f *FactRatingInstruction) GetInstruction() *string {
if f == nil {
return nil
}
return f.Instruction
}
func (f *FactRatingInstruction) GetExtraProperties() map[string]interface{} {
return f.extraProperties
}
func (f *FactRatingInstruction) UnmarshalJSON(data []byte) error {
type unmarshaler FactRatingInstruction
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*f = FactRatingInstruction(value)
extraProperties, err := internal.ExtractExtraProperties(data, *f)
if err != nil {
return err
}
f.extraProperties = extraProperties
f.rawJSON = json.RawMessage(data)
return nil
}
func (f *FactRatingInstruction) String() string {
if len(f.rawJSON) > 0 {
if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
return value
}
}
if value, err := internal.StringifyJSON(f); err == nil {
return value
}
return fmt.Sprintf("%#v", f)
}
type FactsResponse struct {
Facts []*Fact `json:"facts,omitempty" url:"facts,omitempty"`
extraProperties map[string]interface{}
rawJSON json.RawMessage
}
func (f *FactsResponse) GetFacts() []*Fact {
if f == nil {
return nil
}
return f.Facts
}
func (f *FactsResponse) GetExtraProperties() map[string]interface{} {
return f.extraProperties
}
func (f *FactsResponse) UnmarshalJSON(data []byte) error {
type unmarshaler FactsResponse
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*f = FactsResponse(value)
extraProperties, err := internal.ExtractExtraProperties(data, *f)
if err != nil {
return err
}
f.extraProperties = extraProperties
f.rawJSON = json.RawMessage(data)
return nil
}
func (f *FactsResponse) String() string {
if len(f.rawJSON) > 0 {
if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
return value
}
}
if value, err := internal.StringifyJSON(f); err == nil {
return value
}
return fmt.Sprintf("%#v", f)
}
type GraphDataType string
const (
GraphDataTypeText GraphDataType = "text"
GraphDataTypeJSON GraphDataType = "json"
GraphDataTypeMessage GraphDataType = "message"
)
func NewGraphDataTypeFromString(s string) (GraphDataType, error) {
switch s {
case "text":
return GraphDataTypeText, nil
case "json":
return GraphDataTypeJSON, nil
case "message":
return GraphDataTypeMessage, nil
}
var t GraphDataType
return "", fmt.Errorf("%s is not a valid %T", s, t)
}
func (g GraphDataType) Ptr() *GraphDataType {
return &g
}
type MemoryType string
const (
MemoryTypePerpetual MemoryType = "perpetual"
MemoryTypeSummaryRetriever MemoryType = "summary_retriever"
MemoryTypeMessageWindow MemoryType = "message_window"
)
func NewMemoryTypeFromString(s string) (MemoryType, error) {
switch s {
case "perpetual":
return MemoryTypePerpetual, nil
case "summary_retriever":
return MemoryTypeSummaryRetriever, nil
case "message_window":
return MemoryTypeMessageWindow, nil
}
var t MemoryType
return "", fmt.Errorf("%s is not a valid %T", s, t)
}
func (m MemoryType) Ptr() *MemoryType {
return &m
}
type SearchType string
const (
SearchTypeSimilarity SearchType = "similarity"
SearchTypeMmr SearchType = "mmr"
)
func NewSearchTypeFromString(s string) (SearchType, error) {
switch s {
case "similarity":
return SearchTypeSimilarity, nil
case "mmr":
return SearchTypeMmr, nil
}
var t SearchType
return "", fmt.Errorf("%s is not a valid %T", s, t)
}
func (s SearchType) Ptr() *SearchType {
return &s
}
type Session struct {
Classifications map[string]string `json:"classifications,omitempty" url:"classifications,omitempty"`
CreatedAt *string `json:"created_at,omitempty" url:"created_at,omitempty"`
DeletedAt *string `json:"deleted_at,omitempty" url:"deleted_at,omitempty"`
EndedAt *string `json:"ended_at,omitempty" url:"ended_at,omitempty"`
FactRatingInstruction *FactRatingInstruction `json:"fact_rating_instruction,omitempty" url:"fact_rating_instruction,omitempty"`
Facts []string `json:"facts,omitempty" url:"facts,omitempty"`
// TODO deprecate
ID *int `json:"id,omitempty" url:"id,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty" url:"metadata,omitempty"`
ProjectUUID *string `json:"project_uuid,omitempty" url:"project_uuid,omitempty"`
SessionID *string `json:"session_id,omitempty" url:"session_id,omitempty"`
UpdatedAt *string `json:"updated_at,omitempty" url:"updated_at,omitempty"`
// Must be a pointer to allow for null values
UserID *string `json:"user_id,omitempty" url:"user_id,omitempty"`
UUID *string `json:"uuid,omitempty" url:"uuid,omitempty"`
extraProperties map[string]interface{}
rawJSON json.RawMessage
}
func (s *Session) GetClassifications() map[string]string {
if s == nil {
return nil
}
return s.Classifications
}
func (s *Session) GetCreatedAt() *string {
if s == nil {
return nil
}
return s.CreatedAt
}
func (s *Session) GetDeletedAt() *string {
if s == nil {
return nil
}
return s.DeletedAt
}
func (s *Session) GetEndedAt() *string {
if s == nil {
return nil
}
return s.EndedAt
}
func (s *Session) GetFactRatingInstruction() *FactRatingInstruction {
if s == nil {
return nil
}
return s.FactRatingInstruction
}
func (s *Session) GetFacts() []string {
if s == nil {
return nil
}
return s.Facts
}
func (s *Session) GetID() *int {
if s == nil {
return nil
}
return s.ID
}
func (s *Session) GetMetadata() map[string]interface{} {
if s == nil {
return nil
}
return s.Metadata
}
func (s *Session) GetProjectUUID() *string {
if s == nil {
return nil
}
return s.ProjectUUID
}
func (s *Session) GetSessionID() *string {
if s == nil {
return nil
}
return s.SessionID
}
func (s *Session) GetUpdatedAt() *string {
if s == nil {
return nil
}
return s.UpdatedAt
}
func (s *Session) GetUserID() *string {
if s == nil {
return nil
}
return s.UserID
}
func (s *Session) GetUUID() *string {
if s == nil {
return nil
}
return s.UUID
}
func (s *Session) GetExtraProperties() map[string]interface{} {
return s.extraProperties
}
func (s *Session) UnmarshalJSON(data []byte) error {
type unmarshaler Session
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*s = Session(value)
extraProperties, err := internal.ExtractExtraProperties(data, *s)
if err != nil {
return err
}
s.extraProperties = extraProperties
s.rawJSON = json.RawMessage(data)
return nil
}
func (s *Session) String() string {
if len(s.rawJSON) > 0 {
if value, err := internal.StringifyJSON(s.rawJSON); err == nil {
return value
}
}
if value, err := internal.StringifyJSON(s); err == nil {
return value
}
return fmt.Sprintf("%#v", s)
}
type SessionFactRatingExamples = interface{}
type SessionFactRatingInstruction = interface{}
type SuccessResponse struct {