Files
sdk/model_rag_embed_result.go

302 lines
7.7 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
)
// checks if the RagEmbedResult type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &RagEmbedResult{}
// RagEmbedResult struct for RagEmbedResult
type RagEmbedResult struct {
Chunks *int32 `json:"chunks,omitempty"`
FileId *string `json:"file_id,omitempty"`
Filename *string `json:"filename,omitempty"`
IndexName *string `json:"index_name,omitempty"`
Store *string `json:"store,omitempty"`
AdditionalProperties map[string]interface{}
}
type _RagEmbedResult RagEmbedResult
// NewRagEmbedResult instantiates a new RagEmbedResult 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 NewRagEmbedResult() *RagEmbedResult {
this := RagEmbedResult{}
return &this
}
// NewRagEmbedResultWithDefaults instantiates a new RagEmbedResult 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 NewRagEmbedResultWithDefaults() *RagEmbedResult {
this := RagEmbedResult{}
return &this
}
// GetChunks returns the Chunks field value if set, zero value otherwise.
func (o *RagEmbedResult) GetChunks() int32 {
if o == nil || IsNil(o.Chunks) {
var ret int32
return ret
}
return *o.Chunks
}
// GetChunksOk returns a tuple with the Chunks field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RagEmbedResult) GetChunksOk() (*int32, bool) {
if o == nil || IsNil(o.Chunks) {
return nil, false
}
return o.Chunks, true
}
// HasChunks returns a boolean if a field has been set.
func (o *RagEmbedResult) HasChunks() bool {
if o != nil && !IsNil(o.Chunks) {
return true
}
return false
}
// SetChunks gets a reference to the given int32 and assigns it to the Chunks field.
func (o *RagEmbedResult) SetChunks(v int32) {
o.Chunks = &v
}
// GetFileId returns the FileId field value if set, zero value otherwise.
func (o *RagEmbedResult) GetFileId() string {
if o == nil || IsNil(o.FileId) {
var ret string
return ret
}
return *o.FileId
}
// GetFileIdOk returns a tuple with the FileId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RagEmbedResult) GetFileIdOk() (*string, bool) {
if o == nil || IsNil(o.FileId) {
return nil, false
}
return o.FileId, true
}
// HasFileId returns a boolean if a field has been set.
func (o *RagEmbedResult) HasFileId() bool {
if o != nil && !IsNil(o.FileId) {
return true
}
return false
}
// SetFileId gets a reference to the given string and assigns it to the FileId field.
func (o *RagEmbedResult) SetFileId(v string) {
o.FileId = &v
}
// GetFilename returns the Filename field value if set, zero value otherwise.
func (o *RagEmbedResult) GetFilename() string {
if o == nil || IsNil(o.Filename) {
var ret string
return ret
}
return *o.Filename
}
// GetFilenameOk returns a tuple with the Filename field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RagEmbedResult) GetFilenameOk() (*string, bool) {
if o == nil || IsNil(o.Filename) {
return nil, false
}
return o.Filename, true
}
// HasFilename returns a boolean if a field has been set.
func (o *RagEmbedResult) HasFilename() bool {
if o != nil && !IsNil(o.Filename) {
return true
}
return false
}
// SetFilename gets a reference to the given string and assigns it to the Filename field.
func (o *RagEmbedResult) SetFilename(v string) {
o.Filename = &v
}
// GetIndexName returns the IndexName field value if set, zero value otherwise.
func (o *RagEmbedResult) GetIndexName() string {
if o == nil || IsNil(o.IndexName) {
var ret string
return ret
}
return *o.IndexName
}
// GetIndexNameOk returns a tuple with the IndexName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RagEmbedResult) GetIndexNameOk() (*string, bool) {
if o == nil || IsNil(o.IndexName) {
return nil, false
}
return o.IndexName, true
}
// HasIndexName returns a boolean if a field has been set.
func (o *RagEmbedResult) HasIndexName() bool {
if o != nil && !IsNil(o.IndexName) {
return true
}
return false
}
// SetIndexName gets a reference to the given string and assigns it to the IndexName field.
func (o *RagEmbedResult) SetIndexName(v string) {
o.IndexName = &v
}
// GetStore returns the Store field value if set, zero value otherwise.
func (o *RagEmbedResult) GetStore() string {
if o == nil || IsNil(o.Store) {
var ret string
return ret
}
return *o.Store
}
// GetStoreOk returns a tuple with the Store field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RagEmbedResult) GetStoreOk() (*string, bool) {
if o == nil || IsNil(o.Store) {
return nil, false
}
return o.Store, true
}
// HasStore returns a boolean if a field has been set.
func (o *RagEmbedResult) HasStore() bool {
if o != nil && !IsNil(o.Store) {
return true
}
return false
}
// SetStore gets a reference to the given string and assigns it to the Store field.
func (o *RagEmbedResult) SetStore(v string) {
o.Store = &v
}
func (o RagEmbedResult) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o RagEmbedResult) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Chunks) {
toSerialize["chunks"] = o.Chunks
}
if !IsNil(o.FileId) {
toSerialize["file_id"] = o.FileId
}
if !IsNil(o.Filename) {
toSerialize["filename"] = o.Filename
}
if !IsNil(o.IndexName) {
toSerialize["index_name"] = o.IndexName
}
if !IsNil(o.Store) {
toSerialize["store"] = o.Store
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *RagEmbedResult) UnmarshalJSON(data []byte) (err error) {
varRagEmbedResult := _RagEmbedResult{}
err = json.Unmarshal(data, &varRagEmbedResult)
if err != nil {
return err
}
*o = RagEmbedResult(varRagEmbedResult)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "chunks")
delete(additionalProperties, "file_id")
delete(additionalProperties, "filename")
delete(additionalProperties, "index_name")
delete(additionalProperties, "store")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableRagEmbedResult struct {
value *RagEmbedResult
isSet bool
}
func (v NullableRagEmbedResult) Get() *RagEmbedResult {
return v.value
}
func (v *NullableRagEmbedResult) Set(val *RagEmbedResult) {
v.value = val
v.isSet = true
}
func (v NullableRagEmbedResult) IsSet() bool {
return v.isSet
}
func (v *NullableRagEmbedResult) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRagEmbedResult(val *RagEmbedResult) *NullableRagEmbedResult {
return &NullableRagEmbedResult{value: val, isSet: true}
}
func (v NullableRagEmbedResult) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRagEmbedResult) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}