-
Notifications
You must be signed in to change notification settings - Fork 2
/
model_highlight.go
972 lines (835 loc) · 26.5 KB
/
model_highlight.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
/*
Manticore Search Client
Сlient for Manticore Search.
API version: 5.0.0
Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// checks if the Highlight type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Highlight{}
// Highlight struct for Highlight
type Highlight struct {
// Maximum size of the text fragments in highlighted snippets per field
FragmentSize interface{}
// Maximum size of snippets per field
Limit interface{}
// Maximum number of snippets per field
LimitSnippets interface{}
// Maximum number of words per field
LimitWords interface{}
// Total number of highlighted fragments per field
NumberOfFragments interface{}
// Text inserted after the matched term, typically used for HTML formatting
AfterMatch *string
// Permits an empty string to be returned as the highlighting result. Otherwise, the beginning of the original text would be returned
AllowEmpty *bool
// Number of words around the match to include in the highlight
Around *int32
// Text inserted before the match, typically used for HTML formatting
BeforeMatch *string
// Emits an HTML tag with the enclosing zone name before each highlighted snippet
EmitZones *bool
// If set to 'html', retains HTML markup when highlighting
Encoder *string
Fields map[string]interface{}
// Ignores the length limit until the result includes all keywords
ForceAllWords *bool
// Forces snippet generation even if limits allow highlighting the entire text
ForceSnippets *bool
HighlightQuery NullableQueryFilter
// Defines the mode for handling HTML markup in the highlight
HtmlStripMode *string
// Determines whether the 'limit', 'limit_words', and 'limit_snippets' options operate as individual limits in each field of the document
LimitsPerField *bool
// If set to 1, allows an empty string to be returned as a highlighting result
NoMatchSize *int32
// Sets the sorting order of highlighted snippets
Order *string
// Text inserted before each highlighted snippet
PreTags *string
// Text inserted after each highlighted snippet
PostTags *string
// Sets the starting value of the %SNIPPET_ID% macro
StartSnippetId *int32
// Defines whether to additionally break snippets by phrase boundary characters
UseBoundaries *bool
}
// NewHighlight instantiates a new Highlight object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewHighlight() *Highlight {
this := Highlight{}
var afterMatch string = "</strong>"
this.AfterMatch = &afterMatch
var beforeMatch string = "<strong>"
this.BeforeMatch = &beforeMatch
var preTags string = "<strong>"
this.PreTags = &preTags
var postTags string = "</strong>"
this.PostTags = &postTags
return &this
}
// NewHighlightWithDefaults instantiates a new Highlight object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewHighlightWithDefaults() *Highlight {
this := Highlight{}
var afterMatch string = "</strong>"
this.AfterMatch = &afterMatch
var beforeMatch string = "<strong>"
this.BeforeMatch = &beforeMatch
var preTags string = "<strong>"
this.PreTags = &preTags
var postTags string = "</strong>"
this.PostTags = &postTags
return &this
}
// GetFragmentSize returns the FragmentSize field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Highlight) GetFragmentSize() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.FragmentSize
}
// GetFragmentSizeOk returns a tuple with the FragmentSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Highlight) GetFragmentSizeOk() (*interface{}, bool) {
if o == nil || IsNil(o.FragmentSize) {
return nil, false
}
return &o.FragmentSize, true
}
// HasFragmentSize returns a boolean if a field has been set.
func (o *Highlight) HasFragmentSize() bool {
if o != nil && !IsNil(o.FragmentSize) {
return true
}
return false
}
// SetFragmentSize gets a reference to the given interface{} and assigns it to the FragmentSize field.
func (o *Highlight) SetFragmentSize(v interface{}) {
o.FragmentSize = v
}
// GetLimit returns the Limit field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Highlight) GetLimit() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Limit
}
// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Highlight) GetLimitOk() (*interface{}, bool) {
if o == nil || IsNil(o.Limit) {
return nil, false
}
return &o.Limit, true
}
// HasLimit returns a boolean if a field has been set.
func (o *Highlight) HasLimit() bool {
if o != nil && !IsNil(o.Limit) {
return true
}
return false
}
// SetLimit gets a reference to the given interface{} and assigns it to the Limit field.
func (o *Highlight) SetLimit(v interface{}) {
o.Limit = v
}
// GetLimitSnippets returns the LimitSnippets field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Highlight) GetLimitSnippets() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.LimitSnippets
}
// GetLimitSnippetsOk returns a tuple with the LimitSnippets field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Highlight) GetLimitSnippetsOk() (*interface{}, bool) {
if o == nil || IsNil(o.LimitSnippets) {
return nil, false
}
return &o.LimitSnippets, true
}
// HasLimitSnippets returns a boolean if a field has been set.
func (o *Highlight) HasLimitSnippets() bool {
if o != nil && !IsNil(o.LimitSnippets) {
return true
}
return false
}
// SetLimitSnippets gets a reference to the given interface{} and assigns it to the LimitSnippets field.
func (o *Highlight) SetLimitSnippets(v interface{}) {
o.LimitSnippets = v
}
// GetLimitWords returns the LimitWords field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Highlight) GetLimitWords() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.LimitWords
}
// GetLimitWordsOk returns a tuple with the LimitWords field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Highlight) GetLimitWordsOk() (*interface{}, bool) {
if o == nil || IsNil(o.LimitWords) {
return nil, false
}
return &o.LimitWords, true
}
// HasLimitWords returns a boolean if a field has been set.
func (o *Highlight) HasLimitWords() bool {
if o != nil && !IsNil(o.LimitWords) {
return true
}
return false
}
// SetLimitWords gets a reference to the given interface{} and assigns it to the LimitWords field.
func (o *Highlight) SetLimitWords(v interface{}) {
o.LimitWords = v
}
// GetNumberOfFragments returns the NumberOfFragments field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Highlight) GetNumberOfFragments() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.NumberOfFragments
}
// GetNumberOfFragmentsOk returns a tuple with the NumberOfFragments field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Highlight) GetNumberOfFragmentsOk() (*interface{}, bool) {
if o == nil || IsNil(o.NumberOfFragments) {
return nil, false
}
return &o.NumberOfFragments, true
}
// HasNumberOfFragments returns a boolean if a field has been set.
func (o *Highlight) HasNumberOfFragments() bool {
if o != nil && !IsNil(o.NumberOfFragments) {
return true
}
return false
}
// SetNumberOfFragments gets a reference to the given interface{} and assigns it to the NumberOfFragments field.
func (o *Highlight) SetNumberOfFragments(v interface{}) {
o.NumberOfFragments = v
}
// GetAfterMatch returns the AfterMatch field value if set, zero value otherwise.
func (o *Highlight) GetAfterMatch() string {
if o == nil || IsNil(o.AfterMatch) {
var ret string
return ret
}
return *o.AfterMatch
}
// GetAfterMatchOk returns a tuple with the AfterMatch field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Highlight) GetAfterMatchOk() (*string, bool) {
if o == nil || IsNil(o.AfterMatch) {
return nil, false
}
return o.AfterMatch, true
}
// HasAfterMatch returns a boolean if a field has been set.
func (o *Highlight) HasAfterMatch() bool {
if o != nil && !IsNil(o.AfterMatch) {
return true
}
return false
}
// SetAfterMatch gets a reference to the given string and assigns it to the AfterMatch field.
func (o *Highlight) SetAfterMatch(v string) {
o.AfterMatch = &v
}
// GetAllowEmpty returns the AllowEmpty field value if set, zero value otherwise.
func (o *Highlight) GetAllowEmpty() bool {
if o == nil || IsNil(o.AllowEmpty) {
var ret bool
return ret
}
return *o.AllowEmpty
}
// GetAllowEmptyOk returns a tuple with the AllowEmpty field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Highlight) GetAllowEmptyOk() (*bool, bool) {
if o == nil || IsNil(o.AllowEmpty) {
return nil, false
}
return o.AllowEmpty, true
}
// HasAllowEmpty returns a boolean if a field has been set.
func (o *Highlight) HasAllowEmpty() bool {
if o != nil && !IsNil(o.AllowEmpty) {
return true
}
return false
}
// SetAllowEmpty gets a reference to the given bool and assigns it to the AllowEmpty field.
func (o *Highlight) SetAllowEmpty(v bool) {
o.AllowEmpty = &v
}
// GetAround returns the Around field value if set, zero value otherwise.
func (o *Highlight) GetAround() int32 {
if o == nil || IsNil(o.Around) {
var ret int32
return ret
}
return *o.Around
}
// GetAroundOk returns a tuple with the Around field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Highlight) GetAroundOk() (*int32, bool) {
if o == nil || IsNil(o.Around) {
return nil, false
}
return o.Around, true
}
// HasAround returns a boolean if a field has been set.
func (o *Highlight) HasAround() bool {
if o != nil && !IsNil(o.Around) {
return true
}
return false
}
// SetAround gets a reference to the given int32 and assigns it to the Around field.
func (o *Highlight) SetAround(v int32) {
o.Around = &v
}
// GetBeforeMatch returns the BeforeMatch field value if set, zero value otherwise.
func (o *Highlight) GetBeforeMatch() string {
if o == nil || IsNil(o.BeforeMatch) {
var ret string
return ret
}
return *o.BeforeMatch
}
// GetBeforeMatchOk returns a tuple with the BeforeMatch field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Highlight) GetBeforeMatchOk() (*string, bool) {
if o == nil || IsNil(o.BeforeMatch) {
return nil, false
}
return o.BeforeMatch, true
}
// HasBeforeMatch returns a boolean if a field has been set.
func (o *Highlight) HasBeforeMatch() bool {
if o != nil && !IsNil(o.BeforeMatch) {
return true
}
return false
}
// SetBeforeMatch gets a reference to the given string and assigns it to the BeforeMatch field.
func (o *Highlight) SetBeforeMatch(v string) {
o.BeforeMatch = &v
}
// GetEmitZones returns the EmitZones field value if set, zero value otherwise.
func (o *Highlight) GetEmitZones() bool {
if o == nil || IsNil(o.EmitZones) {
var ret bool
return ret
}
return *o.EmitZones
}
// GetEmitZonesOk returns a tuple with the EmitZones field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Highlight) GetEmitZonesOk() (*bool, bool) {
if o == nil || IsNil(o.EmitZones) {
return nil, false
}
return o.EmitZones, true
}
// HasEmitZones returns a boolean if a field has been set.
func (o *Highlight) HasEmitZones() bool {
if o != nil && !IsNil(o.EmitZones) {
return true
}
return false
}
// SetEmitZones gets a reference to the given bool and assigns it to the EmitZones field.
func (o *Highlight) SetEmitZones(v bool) {
o.EmitZones = &v
}
// GetEncoder returns the Encoder field value if set, zero value otherwise.
func (o *Highlight) GetEncoder() string {
if o == nil || IsNil(o.Encoder) {
var ret string
return ret
}
return *o.Encoder
}
// GetEncoderOk returns a tuple with the Encoder field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Highlight) GetEncoderOk() (*string, bool) {
if o == nil || IsNil(o.Encoder) {
return nil, false
}
return o.Encoder, true
}
// HasEncoder returns a boolean if a field has been set.
func (o *Highlight) HasEncoder() bool {
if o != nil && !IsNil(o.Encoder) {
return true
}
return false
}
// SetEncoder gets a reference to the given string and assigns it to the Encoder field.
func (o *Highlight) SetEncoder(v string) {
o.Encoder = &v
}
// GetFields returns the Fields field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Highlight) GetFields() map[string]interface{} {
if o == nil {
var ret map[string]interface{}
return ret
}
return o.Fields
}
// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Highlight) GetFieldsOk() (map[string]interface{}, bool) {
if o == nil || IsNil(o.Fields) {
return map[string]interface{}{}, false
}
return o.Fields, true
}
// HasFields returns a boolean if a field has been set.
func (o *Highlight) HasFields() bool {
if o != nil && !IsNil(o.Fields) {
return true
}
return false
}
// SetFields gets a reference to the given map[string]interface{} and assigns it to the Fields field.
func (o *Highlight) SetFields(v map[string]interface{}) {
o.Fields = v
}
// GetForceAllWords returns the ForceAllWords field value if set, zero value otherwise.
func (o *Highlight) GetForceAllWords() bool {
if o == nil || IsNil(o.ForceAllWords) {
var ret bool
return ret
}
return *o.ForceAllWords
}
// GetForceAllWordsOk returns a tuple with the ForceAllWords field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Highlight) GetForceAllWordsOk() (*bool, bool) {
if o == nil || IsNil(o.ForceAllWords) {
return nil, false
}
return o.ForceAllWords, true
}
// HasForceAllWords returns a boolean if a field has been set.
func (o *Highlight) HasForceAllWords() bool {
if o != nil && !IsNil(o.ForceAllWords) {
return true
}
return false
}
// SetForceAllWords gets a reference to the given bool and assigns it to the ForceAllWords field.
func (o *Highlight) SetForceAllWords(v bool) {
o.ForceAllWords = &v
}
// GetForceSnippets returns the ForceSnippets field value if set, zero value otherwise.
func (o *Highlight) GetForceSnippets() bool {
if o == nil || IsNil(o.ForceSnippets) {
var ret bool
return ret
}
return *o.ForceSnippets
}
// GetForceSnippetsOk returns a tuple with the ForceSnippets field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Highlight) GetForceSnippetsOk() (*bool, bool) {
if o == nil || IsNil(o.ForceSnippets) {
return nil, false
}
return o.ForceSnippets, true
}
// HasForceSnippets returns a boolean if a field has been set.
func (o *Highlight) HasForceSnippets() bool {
if o != nil && !IsNil(o.ForceSnippets) {
return true
}
return false
}
// SetForceSnippets gets a reference to the given bool and assigns it to the ForceSnippets field.
func (o *Highlight) SetForceSnippets(v bool) {
o.ForceSnippets = &v
}
// GetHighlightQuery returns the HighlightQuery field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Highlight) GetHighlightQuery() QueryFilter {
if o == nil || IsNil(o.HighlightQuery.Get()) {
var ret QueryFilter
return ret
}
return *o.HighlightQuery.Get()
}
// GetHighlightQueryOk returns a tuple with the HighlightQuery field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Highlight) GetHighlightQueryOk() (*QueryFilter, bool) {
if o == nil {
return nil, false
}
return o.HighlightQuery.Get(), o.HighlightQuery.IsSet()
}
// HasHighlightQuery returns a boolean if a field has been set.
func (o *Highlight) HasHighlightQuery() bool {
if o != nil && o.HighlightQuery.IsSet() {
return true
}
return false
}
// SetHighlightQuery gets a reference to the given NullableQueryFilter and assigns it to the HighlightQuery field.
func (o *Highlight) SetHighlightQuery(v QueryFilter) {
o.HighlightQuery.Set(&v)
}
// SetHighlightQueryNil sets the value for HighlightQuery to be an explicit nil
func (o *Highlight) SetHighlightQueryNil() {
o.HighlightQuery.Set(nil)
}
// UnsetHighlightQuery ensures that no value is present for HighlightQuery, not even an explicit nil
func (o *Highlight) UnsetHighlightQuery() {
o.HighlightQuery.Unset()
}
// GetHtmlStripMode returns the HtmlStripMode field value if set, zero value otherwise.
func (o *Highlight) GetHtmlStripMode() string {
if o == nil || IsNil(o.HtmlStripMode) {
var ret string
return ret
}
return *o.HtmlStripMode
}
// GetHtmlStripModeOk returns a tuple with the HtmlStripMode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Highlight) GetHtmlStripModeOk() (*string, bool) {
if o == nil || IsNil(o.HtmlStripMode) {
return nil, false
}
return o.HtmlStripMode, true
}
// HasHtmlStripMode returns a boolean if a field has been set.
func (o *Highlight) HasHtmlStripMode() bool {
if o != nil && !IsNil(o.HtmlStripMode) {
return true
}
return false
}
// SetHtmlStripMode gets a reference to the given string and assigns it to the HtmlStripMode field.
func (o *Highlight) SetHtmlStripMode(v string) {
o.HtmlStripMode = &v
}
// GetLimitsPerField returns the LimitsPerField field value if set, zero value otherwise.
func (o *Highlight) GetLimitsPerField() bool {
if o == nil || IsNil(o.LimitsPerField) {
var ret bool
return ret
}
return *o.LimitsPerField
}
// GetLimitsPerFieldOk returns a tuple with the LimitsPerField field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Highlight) GetLimitsPerFieldOk() (*bool, bool) {
if o == nil || IsNil(o.LimitsPerField) {
return nil, false
}
return o.LimitsPerField, true
}
// HasLimitsPerField returns a boolean if a field has been set.
func (o *Highlight) HasLimitsPerField() bool {
if o != nil && !IsNil(o.LimitsPerField) {
return true
}
return false
}
// SetLimitsPerField gets a reference to the given bool and assigns it to the LimitsPerField field.
func (o *Highlight) SetLimitsPerField(v bool) {
o.LimitsPerField = &v
}
// GetNoMatchSize returns the NoMatchSize field value if set, zero value otherwise.
func (o *Highlight) GetNoMatchSize() int32 {
if o == nil || IsNil(o.NoMatchSize) {
var ret int32
return ret
}
return *o.NoMatchSize
}
// GetNoMatchSizeOk returns a tuple with the NoMatchSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Highlight) GetNoMatchSizeOk() (*int32, bool) {
if o == nil || IsNil(o.NoMatchSize) {
return nil, false
}
return o.NoMatchSize, true
}
// HasNoMatchSize returns a boolean if a field has been set.
func (o *Highlight) HasNoMatchSize() bool {
if o != nil && !IsNil(o.NoMatchSize) {
return true
}
return false
}
// SetNoMatchSize gets a reference to the given int32 and assigns it to the NoMatchSize field.
func (o *Highlight) SetNoMatchSize(v int32) {
o.NoMatchSize = &v
}
// GetOrder returns the Order field value if set, zero value otherwise.
func (o *Highlight) GetOrder() string {
if o == nil || IsNil(o.Order) {
var ret string
return ret
}
return *o.Order
}
// GetOrderOk returns a tuple with the Order field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Highlight) GetOrderOk() (*string, bool) {
if o == nil || IsNil(o.Order) {
return nil, false
}
return o.Order, true
}
// HasOrder returns a boolean if a field has been set.
func (o *Highlight) HasOrder() bool {
if o != nil && !IsNil(o.Order) {
return true
}
return false
}
// SetOrder gets a reference to the given string and assigns it to the Order field.
func (o *Highlight) SetOrder(v string) {
o.Order = &v
}
// GetPreTags returns the PreTags field value if set, zero value otherwise.
func (o *Highlight) GetPreTags() string {
if o == nil || IsNil(o.PreTags) {
var ret string
return ret
}
return *o.PreTags
}
// GetPreTagsOk returns a tuple with the PreTags field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Highlight) GetPreTagsOk() (*string, bool) {
if o == nil || IsNil(o.PreTags) {
return nil, false
}
return o.PreTags, true
}
// HasPreTags returns a boolean if a field has been set.
func (o *Highlight) HasPreTags() bool {
if o != nil && !IsNil(o.PreTags) {
return true
}
return false
}
// SetPreTags gets a reference to the given string and assigns it to the PreTags field.
func (o *Highlight) SetPreTags(v string) {
o.PreTags = &v
}
// GetPostTags returns the PostTags field value if set, zero value otherwise.
func (o *Highlight) GetPostTags() string {
if o == nil || IsNil(o.PostTags) {
var ret string
return ret
}
return *o.PostTags
}
// GetPostTagsOk returns a tuple with the PostTags field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Highlight) GetPostTagsOk() (*string, bool) {
if o == nil || IsNil(o.PostTags) {
return nil, false
}
return o.PostTags, true
}
// HasPostTags returns a boolean if a field has been set.
func (o *Highlight) HasPostTags() bool {
if o != nil && !IsNil(o.PostTags) {
return true
}
return false
}
// SetPostTags gets a reference to the given string and assigns it to the PostTags field.
func (o *Highlight) SetPostTags(v string) {
o.PostTags = &v
}
// GetStartSnippetId returns the StartSnippetId field value if set, zero value otherwise.
func (o *Highlight) GetStartSnippetId() int32 {
if o == nil || IsNil(o.StartSnippetId) {
var ret int32
return ret
}
return *o.StartSnippetId
}
// GetStartSnippetIdOk returns a tuple with the StartSnippetId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Highlight) GetStartSnippetIdOk() (*int32, bool) {
if o == nil || IsNil(o.StartSnippetId) {
return nil, false
}
return o.StartSnippetId, true
}
// HasStartSnippetId returns a boolean if a field has been set.
func (o *Highlight) HasStartSnippetId() bool {
if o != nil && !IsNil(o.StartSnippetId) {
return true
}
return false
}
// SetStartSnippetId gets a reference to the given int32 and assigns it to the StartSnippetId field.
func (o *Highlight) SetStartSnippetId(v int32) {
o.StartSnippetId = &v
}
// GetUseBoundaries returns the UseBoundaries field value if set, zero value otherwise.
func (o *Highlight) GetUseBoundaries() bool {
if o == nil || IsNil(o.UseBoundaries) {
var ret bool
return ret
}
return *o.UseBoundaries
}
// GetUseBoundariesOk returns a tuple with the UseBoundaries field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Highlight) GetUseBoundariesOk() (*bool, bool) {
if o == nil || IsNil(o.UseBoundaries) {
return nil, false
}
return o.UseBoundaries, true
}
// HasUseBoundaries returns a boolean if a field has been set.
func (o *Highlight) HasUseBoundaries() bool {
if o != nil && !IsNil(o.UseBoundaries) {
return true
}
return false
}
// SetUseBoundaries gets a reference to the given bool and assigns it to the UseBoundaries field.
func (o *Highlight) SetUseBoundaries(v bool) {
o.UseBoundaries = &v
}
func (o Highlight) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Highlight) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.FragmentSize != nil {
toSerialize["fragment_size"] = o.FragmentSize
}
if o.Limit != nil {
toSerialize["limit"] = o.Limit
}
if o.LimitSnippets != nil {
toSerialize["limit_snippets"] = o.LimitSnippets
}
if o.LimitWords != nil {
toSerialize["limit_words"] = o.LimitWords
}
if o.NumberOfFragments != nil {
toSerialize["number_of_fragments"] = o.NumberOfFragments
}
if !IsNil(o.AfterMatch) {
toSerialize["after_match"] = o.AfterMatch
}
if !IsNil(o.AllowEmpty) {
toSerialize["allow_empty"] = o.AllowEmpty
}
if !IsNil(o.Around) {
toSerialize["around"] = o.Around
}
if !IsNil(o.BeforeMatch) {
toSerialize["before_match"] = o.BeforeMatch
}
if !IsNil(o.EmitZones) {
toSerialize["emit_zones"] = o.EmitZones
}
if !IsNil(o.Encoder) {
toSerialize["encoder"] = o.Encoder
}
if o.Fields != nil {
toSerialize["fields"] = o.Fields
}
if !IsNil(o.ForceAllWords) {
toSerialize["force_all_words"] = o.ForceAllWords
}
if !IsNil(o.ForceSnippets) {
toSerialize["force_snippets"] = o.ForceSnippets
}
if o.HighlightQuery.IsSet() {
toSerialize["highlight_query"] = o.HighlightQuery.Get()
}
if !IsNil(o.HtmlStripMode) {
toSerialize["html_strip_mode"] = o.HtmlStripMode
}
if !IsNil(o.LimitsPerField) {
toSerialize["limits_per_field"] = o.LimitsPerField
}
if !IsNil(o.NoMatchSize) {
toSerialize["no_match_size"] = o.NoMatchSize
}
if !IsNil(o.Order) {
toSerialize["order"] = o.Order
}
if !IsNil(o.PreTags) {
toSerialize["pre_tags"] = o.PreTags
}
if !IsNil(o.PostTags) {
toSerialize["post_tags"] = o.PostTags
}
if !IsNil(o.StartSnippetId) {
toSerialize["start_snippet_id"] = o.StartSnippetId
}
if !IsNil(o.UseBoundaries) {
toSerialize["use_boundaries"] = o.UseBoundaries
}
return toSerialize, nil
}
type NullableHighlight struct {
value *Highlight
isSet bool
}
func (v NullableHighlight) Get() *Highlight {
return v.value
}
func (v *NullableHighlight) Set(val *Highlight) {
v.value = val
v.isSet = true
}
func (v NullableHighlight) IsSet() bool {
return v.isSet
}
func (v *NullableHighlight) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableHighlight(val *Highlight) *NullableHighlight {
return &NullableHighlight{value: val, isSet: true}
}
func (v NullableHighlight) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableHighlight) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}