/
model_rss_feed_input.go
477 lines (408 loc) · 14.9 KB
/
model_rss_feed_input.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
/*
Carbon
Connect external data to LLMs, no matter the source.
API version: 1.0.0
*/
// Code generated by Konfig (https://konfigthis.com); DO NOT EDIT.
package carbon
import (
"encoding/json"
)
// RSSFeedInput struct for RSSFeedInput
type RSSFeedInput struct {
Tags map[string]interface{} `json:"tags,omitempty"`
Url string `json:"url"`
ChunkSize NullableInt32 `json:"chunk_size,omitempty"`
ChunkOverlap NullableInt32 `json:"chunk_overlap,omitempty"`
SkipEmbeddingGeneration NullableBool `json:"skip_embedding_generation,omitempty"`
EmbeddingModel *EmbeddingGenerators `json:"embedding_model,omitempty"`
GenerateSparseVectors NullableBool `json:"generate_sparse_vectors,omitempty"`
PrependFilenameToChunks NullableBool `json:"prepend_filename_to_chunks,omitempty"`
RequestId NullableString `json:"request_id,omitempty"`
}
// NewRSSFeedInput instantiates a new RSSFeedInput 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 NewRSSFeedInput(url string) *RSSFeedInput {
this := RSSFeedInput{}
this.Url = url
var chunkSize int32 = 1500
this.ChunkSize = *NewNullableInt32(&chunkSize)
var chunkOverlap int32 = 20
this.ChunkOverlap = *NewNullableInt32(&chunkOverlap)
var skipEmbeddingGeneration bool = false
this.SkipEmbeddingGeneration = *NewNullableBool(&skipEmbeddingGeneration)
var generateSparseVectors bool = false
this.GenerateSparseVectors = *NewNullableBool(&generateSparseVectors)
var prependFilenameToChunks bool = false
this.PrependFilenameToChunks = *NewNullableBool(&prependFilenameToChunks)
return &this
}
// NewRSSFeedInputWithDefaults instantiates a new RSSFeedInput 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 NewRSSFeedInputWithDefaults() *RSSFeedInput {
this := RSSFeedInput{}
var chunkSize int32 = 1500
this.ChunkSize = *NewNullableInt32(&chunkSize)
var chunkOverlap int32 = 20
this.ChunkOverlap = *NewNullableInt32(&chunkOverlap)
var skipEmbeddingGeneration bool = false
this.SkipEmbeddingGeneration = *NewNullableBool(&skipEmbeddingGeneration)
var generateSparseVectors bool = false
this.GenerateSparseVectors = *NewNullableBool(&generateSparseVectors)
var prependFilenameToChunks bool = false
this.PrependFilenameToChunks = *NewNullableBool(&prependFilenameToChunks)
return &this
}
// GetTags returns the Tags field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *RSSFeedInput) GetTags() map[string]interface{} {
if o == nil {
var ret map[string]interface{}
return ret
}
return o.Tags
}
// GetTagsOk returns a tuple with the Tags 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 *RSSFeedInput) GetTagsOk() (map[string]interface{}, bool) {
if o == nil || isNil(o.Tags) {
return map[string]interface{}{}, false
}
return o.Tags, true
}
// HasTags returns a boolean if a field has been set.
func (o *RSSFeedInput) HasTags() bool {
if o != nil && isNil(o.Tags) {
return true
}
return false
}
// SetTags gets a reference to the given map[string]interface{} and assigns it to the Tags field.
func (o *RSSFeedInput) SetTags(v map[string]interface{}) {
o.Tags = v
}
// GetUrl returns the Url field value
func (o *RSSFeedInput) GetUrl() string {
if o == nil {
var ret string
return ret
}
return o.Url
}
// GetUrlOk returns a tuple with the Url field value
// and a boolean to check if the value has been set.
func (o *RSSFeedInput) GetUrlOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Url, true
}
// SetUrl sets field value
func (o *RSSFeedInput) SetUrl(v string) {
o.Url = v
}
// GetChunkSize returns the ChunkSize field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *RSSFeedInput) GetChunkSize() int32 {
if o == nil || isNil(o.ChunkSize.Get()) {
var ret int32
return ret
}
return *o.ChunkSize.Get()
}
// GetChunkSizeOk returns a tuple with the ChunkSize 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 *RSSFeedInput) GetChunkSizeOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.ChunkSize.Get(), o.ChunkSize.IsSet()
}
// HasChunkSize returns a boolean if a field has been set.
func (o *RSSFeedInput) HasChunkSize() bool {
if o != nil && o.ChunkSize.IsSet() {
return true
}
return false
}
// SetChunkSize gets a reference to the given NullableInt32 and assigns it to the ChunkSize field.
func (o *RSSFeedInput) SetChunkSize(v int32) {
o.ChunkSize.Set(&v)
}
// SetChunkSizeNil sets the value for ChunkSize to be an explicit nil
func (o *RSSFeedInput) SetChunkSizeNil() {
o.ChunkSize.Set(nil)
}
// UnsetChunkSize ensures that no value is present for ChunkSize, not even an explicit nil
func (o *RSSFeedInput) UnsetChunkSize() {
o.ChunkSize.Unset()
}
// GetChunkOverlap returns the ChunkOverlap field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *RSSFeedInput) GetChunkOverlap() int32 {
if o == nil || isNil(o.ChunkOverlap.Get()) {
var ret int32
return ret
}
return *o.ChunkOverlap.Get()
}
// GetChunkOverlapOk returns a tuple with the ChunkOverlap 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 *RSSFeedInput) GetChunkOverlapOk() (*int32, bool) {
if o == nil {
return nil, false
}
return o.ChunkOverlap.Get(), o.ChunkOverlap.IsSet()
}
// HasChunkOverlap returns a boolean if a field has been set.
func (o *RSSFeedInput) HasChunkOverlap() bool {
if o != nil && o.ChunkOverlap.IsSet() {
return true
}
return false
}
// SetChunkOverlap gets a reference to the given NullableInt32 and assigns it to the ChunkOverlap field.
func (o *RSSFeedInput) SetChunkOverlap(v int32) {
o.ChunkOverlap.Set(&v)
}
// SetChunkOverlapNil sets the value for ChunkOverlap to be an explicit nil
func (o *RSSFeedInput) SetChunkOverlapNil() {
o.ChunkOverlap.Set(nil)
}
// UnsetChunkOverlap ensures that no value is present for ChunkOverlap, not even an explicit nil
func (o *RSSFeedInput) UnsetChunkOverlap() {
o.ChunkOverlap.Unset()
}
// GetSkipEmbeddingGeneration returns the SkipEmbeddingGeneration field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *RSSFeedInput) GetSkipEmbeddingGeneration() bool {
if o == nil || isNil(o.SkipEmbeddingGeneration.Get()) {
var ret bool
return ret
}
return *o.SkipEmbeddingGeneration.Get()
}
// GetSkipEmbeddingGenerationOk returns a tuple with the SkipEmbeddingGeneration 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 *RSSFeedInput) GetSkipEmbeddingGenerationOk() (*bool, bool) {
if o == nil {
return nil, false
}
return o.SkipEmbeddingGeneration.Get(), o.SkipEmbeddingGeneration.IsSet()
}
// HasSkipEmbeddingGeneration returns a boolean if a field has been set.
func (o *RSSFeedInput) HasSkipEmbeddingGeneration() bool {
if o != nil && o.SkipEmbeddingGeneration.IsSet() {
return true
}
return false
}
// SetSkipEmbeddingGeneration gets a reference to the given NullableBool and assigns it to the SkipEmbeddingGeneration field.
func (o *RSSFeedInput) SetSkipEmbeddingGeneration(v bool) {
o.SkipEmbeddingGeneration.Set(&v)
}
// SetSkipEmbeddingGenerationNil sets the value for SkipEmbeddingGeneration to be an explicit nil
func (o *RSSFeedInput) SetSkipEmbeddingGenerationNil() {
o.SkipEmbeddingGeneration.Set(nil)
}
// UnsetSkipEmbeddingGeneration ensures that no value is present for SkipEmbeddingGeneration, not even an explicit nil
func (o *RSSFeedInput) UnsetSkipEmbeddingGeneration() {
o.SkipEmbeddingGeneration.Unset()
}
// GetEmbeddingModel returns the EmbeddingModel field value if set, zero value otherwise.
func (o *RSSFeedInput) GetEmbeddingModel() EmbeddingGenerators {
if o == nil || isNil(o.EmbeddingModel) {
var ret EmbeddingGenerators
return ret
}
return *o.EmbeddingModel
}
// GetEmbeddingModelOk returns a tuple with the EmbeddingModel field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RSSFeedInput) GetEmbeddingModelOk() (*EmbeddingGenerators, bool) {
if o == nil || isNil(o.EmbeddingModel) {
return nil, false
}
return o.EmbeddingModel, true
}
// HasEmbeddingModel returns a boolean if a field has been set.
func (o *RSSFeedInput) HasEmbeddingModel() bool {
if o != nil && !isNil(o.EmbeddingModel) {
return true
}
return false
}
// SetEmbeddingModel gets a reference to the given EmbeddingGenerators and assigns it to the EmbeddingModel field.
func (o *RSSFeedInput) SetEmbeddingModel(v EmbeddingGenerators) {
o.EmbeddingModel = &v
}
// GetGenerateSparseVectors returns the GenerateSparseVectors field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *RSSFeedInput) GetGenerateSparseVectors() bool {
if o == nil || isNil(o.GenerateSparseVectors.Get()) {
var ret bool
return ret
}
return *o.GenerateSparseVectors.Get()
}
// GetGenerateSparseVectorsOk returns a tuple with the GenerateSparseVectors 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 *RSSFeedInput) GetGenerateSparseVectorsOk() (*bool, bool) {
if o == nil {
return nil, false
}
return o.GenerateSparseVectors.Get(), o.GenerateSparseVectors.IsSet()
}
// HasGenerateSparseVectors returns a boolean if a field has been set.
func (o *RSSFeedInput) HasGenerateSparseVectors() bool {
if o != nil && o.GenerateSparseVectors.IsSet() {
return true
}
return false
}
// SetGenerateSparseVectors gets a reference to the given NullableBool and assigns it to the GenerateSparseVectors field.
func (o *RSSFeedInput) SetGenerateSparseVectors(v bool) {
o.GenerateSparseVectors.Set(&v)
}
// SetGenerateSparseVectorsNil sets the value for GenerateSparseVectors to be an explicit nil
func (o *RSSFeedInput) SetGenerateSparseVectorsNil() {
o.GenerateSparseVectors.Set(nil)
}
// UnsetGenerateSparseVectors ensures that no value is present for GenerateSparseVectors, not even an explicit nil
func (o *RSSFeedInput) UnsetGenerateSparseVectors() {
o.GenerateSparseVectors.Unset()
}
// GetPrependFilenameToChunks returns the PrependFilenameToChunks field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *RSSFeedInput) GetPrependFilenameToChunks() bool {
if o == nil || isNil(o.PrependFilenameToChunks.Get()) {
var ret bool
return ret
}
return *o.PrependFilenameToChunks.Get()
}
// GetPrependFilenameToChunksOk returns a tuple with the PrependFilenameToChunks 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 *RSSFeedInput) GetPrependFilenameToChunksOk() (*bool, bool) {
if o == nil {
return nil, false
}
return o.PrependFilenameToChunks.Get(), o.PrependFilenameToChunks.IsSet()
}
// HasPrependFilenameToChunks returns a boolean if a field has been set.
func (o *RSSFeedInput) HasPrependFilenameToChunks() bool {
if o != nil && o.PrependFilenameToChunks.IsSet() {
return true
}
return false
}
// SetPrependFilenameToChunks gets a reference to the given NullableBool and assigns it to the PrependFilenameToChunks field.
func (o *RSSFeedInput) SetPrependFilenameToChunks(v bool) {
o.PrependFilenameToChunks.Set(&v)
}
// SetPrependFilenameToChunksNil sets the value for PrependFilenameToChunks to be an explicit nil
func (o *RSSFeedInput) SetPrependFilenameToChunksNil() {
o.PrependFilenameToChunks.Set(nil)
}
// UnsetPrependFilenameToChunks ensures that no value is present for PrependFilenameToChunks, not even an explicit nil
func (o *RSSFeedInput) UnsetPrependFilenameToChunks() {
o.PrependFilenameToChunks.Unset()
}
// GetRequestId returns the RequestId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *RSSFeedInput) GetRequestId() string {
if o == nil || isNil(o.RequestId.Get()) {
var ret string
return ret
}
return *o.RequestId.Get()
}
// GetRequestIdOk returns a tuple with the RequestId 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 *RSSFeedInput) GetRequestIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.RequestId.Get(), o.RequestId.IsSet()
}
// HasRequestId returns a boolean if a field has been set.
func (o *RSSFeedInput) HasRequestId() bool {
if o != nil && o.RequestId.IsSet() {
return true
}
return false
}
// SetRequestId gets a reference to the given NullableString and assigns it to the RequestId field.
func (o *RSSFeedInput) SetRequestId(v string) {
o.RequestId.Set(&v)
}
// SetRequestIdNil sets the value for RequestId to be an explicit nil
func (o *RSSFeedInput) SetRequestIdNil() {
o.RequestId.Set(nil)
}
// UnsetRequestId ensures that no value is present for RequestId, not even an explicit nil
func (o *RSSFeedInput) UnsetRequestId() {
o.RequestId.Unset()
}
func (o RSSFeedInput) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Tags != nil {
toSerialize["tags"] = o.Tags
}
if true {
toSerialize["url"] = o.Url
}
if o.ChunkSize.IsSet() {
toSerialize["chunk_size"] = o.ChunkSize.Get()
}
if o.ChunkOverlap.IsSet() {
toSerialize["chunk_overlap"] = o.ChunkOverlap.Get()
}
if o.SkipEmbeddingGeneration.IsSet() {
toSerialize["skip_embedding_generation"] = o.SkipEmbeddingGeneration.Get()
}
if !isNil(o.EmbeddingModel) {
toSerialize["embedding_model"] = o.EmbeddingModel
}
if o.GenerateSparseVectors.IsSet() {
toSerialize["generate_sparse_vectors"] = o.GenerateSparseVectors.Get()
}
if o.PrependFilenameToChunks.IsSet() {
toSerialize["prepend_filename_to_chunks"] = o.PrependFilenameToChunks.Get()
}
if o.RequestId.IsSet() {
toSerialize["request_id"] = o.RequestId.Get()
}
return json.Marshal(toSerialize)
}
type NullableRSSFeedInput struct {
value *RSSFeedInput
isSet bool
}
func (v NullableRSSFeedInput) Get() *RSSFeedInput {
return v.value
}
func (v *NullableRSSFeedInput) Set(val *RSSFeedInput) {
v.value = val
v.isSet = true
}
func (v NullableRSSFeedInput) IsSet() bool {
return v.isSet
}
func (v *NullableRSSFeedInput) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRSSFeedInput(val *RSSFeedInput) *NullableRSSFeedInput {
return &NullableRSSFeedInput{value: val, isSet: true}
}
func (v NullableRSSFeedInput) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRSSFeedInput) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}