Files
sdk/model_knowledge_reindex_out.go

269 lines
7.5 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 KnowledgeReindexOut type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &KnowledgeReindexOut{}
// KnowledgeReindexOut struct for KnowledgeReindexOut
type KnowledgeReindexOut struct {
// Failed is how many documents could not be indexed; each is logged with its name and has no passages — the rest of the rebuild went on without it.
Failed *int64 `json:"failed,omitempty"`
// Lexical is how many rows the org's lexical index holds now; 0 in a deployment without the index app.
Lexical *int64 `json:"lexical,omitempty"`
// Removed is how many rows the lexical index held for documents that no longer exist; 0 without the index app.
Removed *int64 `json:"removed,omitempty"`
// Vectors is how many documents were read back, cut into passages, embedded and written to the org's passage store, which was emptied first — so it now holds these documents' passages and nothing else.
Vectors *int64 `json:"vectors,omitempty"`
AdditionalProperties map[string]interface{}
}
type _KnowledgeReindexOut KnowledgeReindexOut
// NewKnowledgeReindexOut instantiates a new KnowledgeReindexOut 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 NewKnowledgeReindexOut() *KnowledgeReindexOut {
this := KnowledgeReindexOut{}
return &this
}
// NewKnowledgeReindexOutWithDefaults instantiates a new KnowledgeReindexOut 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 NewKnowledgeReindexOutWithDefaults() *KnowledgeReindexOut {
this := KnowledgeReindexOut{}
return &this
}
// GetFailed returns the Failed field value if set, zero value otherwise.
func (o *KnowledgeReindexOut) GetFailed() int64 {
if o == nil || IsNil(o.Failed) {
var ret int64
return ret
}
return *o.Failed
}
// GetFailedOk returns a tuple with the Failed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *KnowledgeReindexOut) GetFailedOk() (*int64, bool) {
if o == nil || IsNil(o.Failed) {
return nil, false
}
return o.Failed, true
}
// HasFailed returns a boolean if a field has been set.
func (o *KnowledgeReindexOut) HasFailed() bool {
if o != nil && !IsNil(o.Failed) {
return true
}
return false
}
// SetFailed gets a reference to the given int64 and assigns it to the Failed field.
func (o *KnowledgeReindexOut) SetFailed(v int64) {
o.Failed = &v
}
// GetLexical returns the Lexical field value if set, zero value otherwise.
func (o *KnowledgeReindexOut) GetLexical() int64 {
if o == nil || IsNil(o.Lexical) {
var ret int64
return ret
}
return *o.Lexical
}
// GetLexicalOk returns a tuple with the Lexical field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *KnowledgeReindexOut) GetLexicalOk() (*int64, bool) {
if o == nil || IsNil(o.Lexical) {
return nil, false
}
return o.Lexical, true
}
// HasLexical returns a boolean if a field has been set.
func (o *KnowledgeReindexOut) HasLexical() bool {
if o != nil && !IsNil(o.Lexical) {
return true
}
return false
}
// SetLexical gets a reference to the given int64 and assigns it to the Lexical field.
func (o *KnowledgeReindexOut) SetLexical(v int64) {
o.Lexical = &v
}
// GetRemoved returns the Removed field value if set, zero value otherwise.
func (o *KnowledgeReindexOut) GetRemoved() int64 {
if o == nil || IsNil(o.Removed) {
var ret int64
return ret
}
return *o.Removed
}
// GetRemovedOk returns a tuple with the Removed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *KnowledgeReindexOut) GetRemovedOk() (*int64, bool) {
if o == nil || IsNil(o.Removed) {
return nil, false
}
return o.Removed, true
}
// HasRemoved returns a boolean if a field has been set.
func (o *KnowledgeReindexOut) HasRemoved() bool {
if o != nil && !IsNil(o.Removed) {
return true
}
return false
}
// SetRemoved gets a reference to the given int64 and assigns it to the Removed field.
func (o *KnowledgeReindexOut) SetRemoved(v int64) {
o.Removed = &v
}
// GetVectors returns the Vectors field value if set, zero value otherwise.
func (o *KnowledgeReindexOut) GetVectors() int64 {
if o == nil || IsNil(o.Vectors) {
var ret int64
return ret
}
return *o.Vectors
}
// GetVectorsOk returns a tuple with the Vectors field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *KnowledgeReindexOut) GetVectorsOk() (*int64, bool) {
if o == nil || IsNil(o.Vectors) {
return nil, false
}
return o.Vectors, true
}
// HasVectors returns a boolean if a field has been set.
func (o *KnowledgeReindexOut) HasVectors() bool {
if o != nil && !IsNil(o.Vectors) {
return true
}
return false
}
// SetVectors gets a reference to the given int64 and assigns it to the Vectors field.
func (o *KnowledgeReindexOut) SetVectors(v int64) {
o.Vectors = &v
}
func (o KnowledgeReindexOut) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o KnowledgeReindexOut) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Failed) {
toSerialize["failed"] = o.Failed
}
if !IsNil(o.Lexical) {
toSerialize["lexical"] = o.Lexical
}
if !IsNil(o.Removed) {
toSerialize["removed"] = o.Removed
}
if !IsNil(o.Vectors) {
toSerialize["vectors"] = o.Vectors
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *KnowledgeReindexOut) UnmarshalJSON(data []byte) (err error) {
varKnowledgeReindexOut := _KnowledgeReindexOut{}
err = json.Unmarshal(data, &varKnowledgeReindexOut)
if err != nil {
return err
}
*o = KnowledgeReindexOut(varKnowledgeReindexOut)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "failed")
delete(additionalProperties, "lexical")
delete(additionalProperties, "removed")
delete(additionalProperties, "vectors")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableKnowledgeReindexOut struct {
value *KnowledgeReindexOut
isSet bool
}
func (v NullableKnowledgeReindexOut) Get() *KnowledgeReindexOut {
return v.value
}
func (v *NullableKnowledgeReindexOut) Set(val *KnowledgeReindexOut) {
v.value = val
v.isSet = true
}
func (v NullableKnowledgeReindexOut) IsSet() bool {
return v.isSet
}
func (v *NullableKnowledgeReindexOut) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableKnowledgeReindexOut(val *KnowledgeReindexOut) *NullableKnowledgeReindexOut {
return &NullableKnowledgeReindexOut{value: val, isSet: true}
}
func (v NullableKnowledgeReindexOut) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableKnowledgeReindexOut) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}