mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
915 lines
24 KiB
Go
915 lines
24 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 KnowledgeFile type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &KnowledgeFile{}
|
|
|
|
// KnowledgeFile struct for KnowledgeFile
|
|
type KnowledgeFile struct {
|
|
// Bucket is the org bucket the object is in, by the friendly name /v1/s3/buckets lists.
|
|
Bucket *string `json:"bucket,omitempty"`
|
|
// Chars is the length of the text read out of the file, in bytes.
|
|
Chars *int64 `json:"chars,omitempty"`
|
|
// Clipped is true when only the file's beginning is indexed: its text ran past the org's bound or the room the index has. Note says how far.
|
|
Clipped *bool `json:"clipped,omitempty"`
|
|
// Created is when the file was first registered, in unix seconds.
|
|
Created *int64 `json:"created,omitempty"`
|
|
// Done is how far the running stage has come, of Total: bytes of the file read (extract), sections summarized (toc), cut into passages (passages) and linked (graph), passages embedded (embed). Absent between stages and once the ingest is done.
|
|
Done *int64 `json:"done,omitempty"`
|
|
// Embedded is how many of those passages carry a vector — Passages once the embed stage is done, unless Note says the file is embedded in part.
|
|
Embedded *int64 `json:"embedded,omitempty"`
|
|
// Error is why a stored or failed file was not indexed — or, on a ready file, why it is searched by its words alone — in words a person can act on. Absent otherwise.
|
|
Error *string `json:"error,omitempty"`
|
|
// ID names the file in its org. It is derived from the bucket and key, so registering the same object twice answers the same file.
|
|
Id *string `json:"id,omitempty"`
|
|
// Key is the object's key in that bucket. GET /v1/s3/buckets/{bucket}/objects/{key} answers a signed download URL for it.
|
|
Key *string `json:"key,omitempty"`
|
|
// Name is the object's file name, the last segment of its key.
|
|
Name *string `json:"name,omitempty"`
|
|
// Note says in words where the file is indexed less than whole and why: its text past the org's bound or the room the index has, its passages past the bound on vectors. Absent when the whole file is indexed every way.
|
|
Note *string `json:"note,omitempty"`
|
|
// Parent is the id of the archive this file was unpacked from. Absent for a file uploaded on its own.
|
|
Parent *string `json:"parent,omitempty"`
|
|
// Passages is how many passages its text was cut into.
|
|
Passages *int64 `json:"passages,omitempty"`
|
|
// Project is the project scope it is indexed under. Absent for the org's own files.
|
|
Project *string `json:"project,omitempty"`
|
|
// Sections is how many nodes its table of contents has, the document's own root included.
|
|
Sections *int64 `json:"sections,omitempty"`
|
|
// Size is the object's length in bytes, as the store reports it.
|
|
Size *int64 `json:"size,omitempty"`
|
|
// Stage is the ingest stage the file is in: extract, toc, passages or graph while indexing, embed while a ready file's vectors are written. Absent once the ingest is done.
|
|
Stage *string `json:"stage,omitempty"`
|
|
// Status is queued, indexing, ready, stored (kept but not indexed — Error says why) or failed. A ready file's contents, passages and links are all readable and its full text is searched; its vectors may still be filling in (Stage embed), which adds search by meaning as it goes.
|
|
Status *string `json:"status,omitempty"`
|
|
// Total is what the running stage has to do in all, in Done's units.
|
|
Total *int64 `json:"total,omitempty"`
|
|
// Type is the object's media type as the store holds it, or the one its name implies when the store holds only the generic default.
|
|
Type *string `json:"type,omitempty"`
|
|
// Updated is when its record last changed, in unix seconds.
|
|
Updated *int64 `json:"updated,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _KnowledgeFile KnowledgeFile
|
|
|
|
// NewKnowledgeFile instantiates a new KnowledgeFile 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 NewKnowledgeFile() *KnowledgeFile {
|
|
this := KnowledgeFile{}
|
|
return &this
|
|
}
|
|
|
|
// NewKnowledgeFileWithDefaults instantiates a new KnowledgeFile 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 NewKnowledgeFileWithDefaults() *KnowledgeFile {
|
|
this := KnowledgeFile{}
|
|
return &this
|
|
}
|
|
|
|
// GetBucket returns the Bucket field value if set, zero value otherwise.
|
|
func (o *KnowledgeFile) GetBucket() string {
|
|
if o == nil || IsNil(o.Bucket) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Bucket
|
|
}
|
|
|
|
// GetBucketOk returns a tuple with the Bucket field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFile) GetBucketOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Bucket) {
|
|
return nil, false
|
|
}
|
|
return o.Bucket, true
|
|
}
|
|
|
|
// HasBucket returns a boolean if a field has been set.
|
|
func (o *KnowledgeFile) HasBucket() bool {
|
|
if o != nil && !IsNil(o.Bucket) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBucket gets a reference to the given string and assigns it to the Bucket field.
|
|
func (o *KnowledgeFile) SetBucket(v string) {
|
|
o.Bucket = &v
|
|
}
|
|
|
|
// GetChars returns the Chars field value if set, zero value otherwise.
|
|
func (o *KnowledgeFile) GetChars() int64 {
|
|
if o == nil || IsNil(o.Chars) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Chars
|
|
}
|
|
|
|
// GetCharsOk returns a tuple with the Chars field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFile) GetCharsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Chars) {
|
|
return nil, false
|
|
}
|
|
return o.Chars, true
|
|
}
|
|
|
|
// HasChars returns a boolean if a field has been set.
|
|
func (o *KnowledgeFile) HasChars() bool {
|
|
if o != nil && !IsNil(o.Chars) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetChars gets a reference to the given int64 and assigns it to the Chars field.
|
|
func (o *KnowledgeFile) SetChars(v int64) {
|
|
o.Chars = &v
|
|
}
|
|
|
|
// GetClipped returns the Clipped field value if set, zero value otherwise.
|
|
func (o *KnowledgeFile) GetClipped() bool {
|
|
if o == nil || IsNil(o.Clipped) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Clipped
|
|
}
|
|
|
|
// GetClippedOk returns a tuple with the Clipped field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFile) GetClippedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Clipped) {
|
|
return nil, false
|
|
}
|
|
return o.Clipped, true
|
|
}
|
|
|
|
// HasClipped returns a boolean if a field has been set.
|
|
func (o *KnowledgeFile) HasClipped() bool {
|
|
if o != nil && !IsNil(o.Clipped) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetClipped gets a reference to the given bool and assigns it to the Clipped field.
|
|
func (o *KnowledgeFile) SetClipped(v bool) {
|
|
o.Clipped = &v
|
|
}
|
|
|
|
// GetCreated returns the Created field value if set, zero value otherwise.
|
|
func (o *KnowledgeFile) GetCreated() int64 {
|
|
if o == nil || IsNil(o.Created) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Created
|
|
}
|
|
|
|
// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFile) GetCreatedOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Created) {
|
|
return nil, false
|
|
}
|
|
return o.Created, true
|
|
}
|
|
|
|
// HasCreated returns a boolean if a field has been set.
|
|
func (o *KnowledgeFile) HasCreated() bool {
|
|
if o != nil && !IsNil(o.Created) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreated gets a reference to the given int64 and assigns it to the Created field.
|
|
func (o *KnowledgeFile) SetCreated(v int64) {
|
|
o.Created = &v
|
|
}
|
|
|
|
// GetDone returns the Done field value if set, zero value otherwise.
|
|
func (o *KnowledgeFile) GetDone() int64 {
|
|
if o == nil || IsNil(o.Done) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Done
|
|
}
|
|
|
|
// GetDoneOk returns a tuple with the Done field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFile) GetDoneOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Done) {
|
|
return nil, false
|
|
}
|
|
return o.Done, true
|
|
}
|
|
|
|
// HasDone returns a boolean if a field has been set.
|
|
func (o *KnowledgeFile) HasDone() bool {
|
|
if o != nil && !IsNil(o.Done) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDone gets a reference to the given int64 and assigns it to the Done field.
|
|
func (o *KnowledgeFile) SetDone(v int64) {
|
|
o.Done = &v
|
|
}
|
|
|
|
// GetEmbedded returns the Embedded field value if set, zero value otherwise.
|
|
func (o *KnowledgeFile) GetEmbedded() int64 {
|
|
if o == nil || IsNil(o.Embedded) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Embedded
|
|
}
|
|
|
|
// GetEmbeddedOk returns a tuple with the Embedded field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFile) GetEmbeddedOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Embedded) {
|
|
return nil, false
|
|
}
|
|
return o.Embedded, true
|
|
}
|
|
|
|
// HasEmbedded returns a boolean if a field has been set.
|
|
func (o *KnowledgeFile) HasEmbedded() bool {
|
|
if o != nil && !IsNil(o.Embedded) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEmbedded gets a reference to the given int64 and assigns it to the Embedded field.
|
|
func (o *KnowledgeFile) SetEmbedded(v int64) {
|
|
o.Embedded = &v
|
|
}
|
|
|
|
// GetError returns the Error field value if set, zero value otherwise.
|
|
func (o *KnowledgeFile) GetError() string {
|
|
if o == nil || IsNil(o.Error) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Error
|
|
}
|
|
|
|
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFile) GetErrorOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Error) {
|
|
return nil, false
|
|
}
|
|
return o.Error, true
|
|
}
|
|
|
|
// HasError returns a boolean if a field has been set.
|
|
func (o *KnowledgeFile) HasError() bool {
|
|
if o != nil && !IsNil(o.Error) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetError gets a reference to the given string and assigns it to the Error field.
|
|
func (o *KnowledgeFile) SetError(v string) {
|
|
o.Error = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *KnowledgeFile) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFile) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *KnowledgeFile) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *KnowledgeFile) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetKey returns the Key field value if set, zero value otherwise.
|
|
func (o *KnowledgeFile) GetKey() string {
|
|
if o == nil || IsNil(o.Key) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Key
|
|
}
|
|
|
|
// GetKeyOk returns a tuple with the Key field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFile) GetKeyOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Key) {
|
|
return nil, false
|
|
}
|
|
return o.Key, true
|
|
}
|
|
|
|
// HasKey returns a boolean if a field has been set.
|
|
func (o *KnowledgeFile) HasKey() bool {
|
|
if o != nil && !IsNil(o.Key) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKey gets a reference to the given string and assigns it to the Key field.
|
|
func (o *KnowledgeFile) SetKey(v string) {
|
|
o.Key = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *KnowledgeFile) GetName() string {
|
|
if o == nil || IsNil(o.Name) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFile) GetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Name) {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *KnowledgeFile) HasName() bool {
|
|
if o != nil && !IsNil(o.Name) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *KnowledgeFile) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetNote returns the Note field value if set, zero value otherwise.
|
|
func (o *KnowledgeFile) GetNote() string {
|
|
if o == nil || IsNil(o.Note) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Note
|
|
}
|
|
|
|
// GetNoteOk returns a tuple with the Note field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFile) GetNoteOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Note) {
|
|
return nil, false
|
|
}
|
|
return o.Note, true
|
|
}
|
|
|
|
// HasNote returns a boolean if a field has been set.
|
|
func (o *KnowledgeFile) HasNote() bool {
|
|
if o != nil && !IsNil(o.Note) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNote gets a reference to the given string and assigns it to the Note field.
|
|
func (o *KnowledgeFile) SetNote(v string) {
|
|
o.Note = &v
|
|
}
|
|
|
|
// GetParent returns the Parent field value if set, zero value otherwise.
|
|
func (o *KnowledgeFile) GetParent() string {
|
|
if o == nil || IsNil(o.Parent) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Parent
|
|
}
|
|
|
|
// GetParentOk returns a tuple with the Parent field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFile) GetParentOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Parent) {
|
|
return nil, false
|
|
}
|
|
return o.Parent, true
|
|
}
|
|
|
|
// HasParent returns a boolean if a field has been set.
|
|
func (o *KnowledgeFile) HasParent() bool {
|
|
if o != nil && !IsNil(o.Parent) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetParent gets a reference to the given string and assigns it to the Parent field.
|
|
func (o *KnowledgeFile) SetParent(v string) {
|
|
o.Parent = &v
|
|
}
|
|
|
|
// GetPassages returns the Passages field value if set, zero value otherwise.
|
|
func (o *KnowledgeFile) GetPassages() int64 {
|
|
if o == nil || IsNil(o.Passages) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Passages
|
|
}
|
|
|
|
// GetPassagesOk returns a tuple with the Passages field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFile) GetPassagesOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Passages) {
|
|
return nil, false
|
|
}
|
|
return o.Passages, true
|
|
}
|
|
|
|
// HasPassages returns a boolean if a field has been set.
|
|
func (o *KnowledgeFile) HasPassages() bool {
|
|
if o != nil && !IsNil(o.Passages) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPassages gets a reference to the given int64 and assigns it to the Passages field.
|
|
func (o *KnowledgeFile) SetPassages(v int64) {
|
|
o.Passages = &v
|
|
}
|
|
|
|
// GetProject returns the Project field value if set, zero value otherwise.
|
|
func (o *KnowledgeFile) GetProject() string {
|
|
if o == nil || IsNil(o.Project) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Project
|
|
}
|
|
|
|
// GetProjectOk returns a tuple with the Project field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFile) GetProjectOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Project) {
|
|
return nil, false
|
|
}
|
|
return o.Project, true
|
|
}
|
|
|
|
// HasProject returns a boolean if a field has been set.
|
|
func (o *KnowledgeFile) HasProject() bool {
|
|
if o != nil && !IsNil(o.Project) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProject gets a reference to the given string and assigns it to the Project field.
|
|
func (o *KnowledgeFile) SetProject(v string) {
|
|
o.Project = &v
|
|
}
|
|
|
|
// GetSections returns the Sections field value if set, zero value otherwise.
|
|
func (o *KnowledgeFile) GetSections() int64 {
|
|
if o == nil || IsNil(o.Sections) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Sections
|
|
}
|
|
|
|
// GetSectionsOk returns a tuple with the Sections field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFile) GetSectionsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Sections) {
|
|
return nil, false
|
|
}
|
|
return o.Sections, true
|
|
}
|
|
|
|
// HasSections returns a boolean if a field has been set.
|
|
func (o *KnowledgeFile) HasSections() bool {
|
|
if o != nil && !IsNil(o.Sections) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSections gets a reference to the given int64 and assigns it to the Sections field.
|
|
func (o *KnowledgeFile) SetSections(v int64) {
|
|
o.Sections = &v
|
|
}
|
|
|
|
// GetSize returns the Size field value if set, zero value otherwise.
|
|
func (o *KnowledgeFile) GetSize() int64 {
|
|
if o == nil || IsNil(o.Size) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Size
|
|
}
|
|
|
|
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFile) GetSizeOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Size) {
|
|
return nil, false
|
|
}
|
|
return o.Size, true
|
|
}
|
|
|
|
// HasSize returns a boolean if a field has been set.
|
|
func (o *KnowledgeFile) HasSize() bool {
|
|
if o != nil && !IsNil(o.Size) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSize gets a reference to the given int64 and assigns it to the Size field.
|
|
func (o *KnowledgeFile) SetSize(v int64) {
|
|
o.Size = &v
|
|
}
|
|
|
|
// GetStage returns the Stage field value if set, zero value otherwise.
|
|
func (o *KnowledgeFile) GetStage() string {
|
|
if o == nil || IsNil(o.Stage) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Stage
|
|
}
|
|
|
|
// GetStageOk returns a tuple with the Stage field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFile) GetStageOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Stage) {
|
|
return nil, false
|
|
}
|
|
return o.Stage, true
|
|
}
|
|
|
|
// HasStage returns a boolean if a field has been set.
|
|
func (o *KnowledgeFile) HasStage() bool {
|
|
if o != nil && !IsNil(o.Stage) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStage gets a reference to the given string and assigns it to the Stage field.
|
|
func (o *KnowledgeFile) SetStage(v string) {
|
|
o.Stage = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *KnowledgeFile) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFile) GetStatusOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *KnowledgeFile) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *KnowledgeFile) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetTotal returns the Total field value if set, zero value otherwise.
|
|
func (o *KnowledgeFile) GetTotal() int64 {
|
|
if o == nil || IsNil(o.Total) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Total
|
|
}
|
|
|
|
// GetTotalOk returns a tuple with the Total field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFile) GetTotalOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Total) {
|
|
return nil, false
|
|
}
|
|
return o.Total, true
|
|
}
|
|
|
|
// HasTotal returns a boolean if a field has been set.
|
|
func (o *KnowledgeFile) HasTotal() bool {
|
|
if o != nil && !IsNil(o.Total) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTotal gets a reference to the given int64 and assigns it to the Total field.
|
|
func (o *KnowledgeFile) SetTotal(v int64) {
|
|
o.Total = &v
|
|
}
|
|
|
|
// GetType returns the Type field value if set, zero value otherwise.
|
|
func (o *KnowledgeFile) GetType() string {
|
|
if o == nil || IsNil(o.Type) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Type
|
|
}
|
|
|
|
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFile) GetTypeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Type) {
|
|
return nil, false
|
|
}
|
|
return o.Type, true
|
|
}
|
|
|
|
// HasType returns a boolean if a field has been set.
|
|
func (o *KnowledgeFile) HasType() bool {
|
|
if o != nil && !IsNil(o.Type) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetType gets a reference to the given string and assigns it to the Type field.
|
|
func (o *KnowledgeFile) SetType(v string) {
|
|
o.Type = &v
|
|
}
|
|
|
|
// GetUpdated returns the Updated field value if set, zero value otherwise.
|
|
func (o *KnowledgeFile) GetUpdated() int64 {
|
|
if o == nil || IsNil(o.Updated) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Updated
|
|
}
|
|
|
|
// GetUpdatedOk returns a tuple with the Updated field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFile) GetUpdatedOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Updated) {
|
|
return nil, false
|
|
}
|
|
return o.Updated, true
|
|
}
|
|
|
|
// HasUpdated returns a boolean if a field has been set.
|
|
func (o *KnowledgeFile) HasUpdated() bool {
|
|
if o != nil && !IsNil(o.Updated) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUpdated gets a reference to the given int64 and assigns it to the Updated field.
|
|
func (o *KnowledgeFile) SetUpdated(v int64) {
|
|
o.Updated = &v
|
|
}
|
|
|
|
func (o KnowledgeFile) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o KnowledgeFile) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Bucket) {
|
|
toSerialize["bucket"] = o.Bucket
|
|
}
|
|
if !IsNil(o.Chars) {
|
|
toSerialize["chars"] = o.Chars
|
|
}
|
|
if !IsNil(o.Clipped) {
|
|
toSerialize["clipped"] = o.Clipped
|
|
}
|
|
if !IsNil(o.Created) {
|
|
toSerialize["created"] = o.Created
|
|
}
|
|
if !IsNil(o.Done) {
|
|
toSerialize["done"] = o.Done
|
|
}
|
|
if !IsNil(o.Embedded) {
|
|
toSerialize["embedded"] = o.Embedded
|
|
}
|
|
if !IsNil(o.Error) {
|
|
toSerialize["error"] = o.Error
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Key) {
|
|
toSerialize["key"] = o.Key
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Note) {
|
|
toSerialize["note"] = o.Note
|
|
}
|
|
if !IsNil(o.Parent) {
|
|
toSerialize["parent"] = o.Parent
|
|
}
|
|
if !IsNil(o.Passages) {
|
|
toSerialize["passages"] = o.Passages
|
|
}
|
|
if !IsNil(o.Project) {
|
|
toSerialize["project"] = o.Project
|
|
}
|
|
if !IsNil(o.Sections) {
|
|
toSerialize["sections"] = o.Sections
|
|
}
|
|
if !IsNil(o.Size) {
|
|
toSerialize["size"] = o.Size
|
|
}
|
|
if !IsNil(o.Stage) {
|
|
toSerialize["stage"] = o.Stage
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.Total) {
|
|
toSerialize["total"] = o.Total
|
|
}
|
|
if !IsNil(o.Type) {
|
|
toSerialize["type"] = o.Type
|
|
}
|
|
if !IsNil(o.Updated) {
|
|
toSerialize["updated"] = o.Updated
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *KnowledgeFile) UnmarshalJSON(data []byte) (err error) {
|
|
varKnowledgeFile := _KnowledgeFile{}
|
|
|
|
err = json.Unmarshal(data, &varKnowledgeFile)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = KnowledgeFile(varKnowledgeFile)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "bucket")
|
|
delete(additionalProperties, "chars")
|
|
delete(additionalProperties, "clipped")
|
|
delete(additionalProperties, "created")
|
|
delete(additionalProperties, "done")
|
|
delete(additionalProperties, "embedded")
|
|
delete(additionalProperties, "error")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "key")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "note")
|
|
delete(additionalProperties, "parent")
|
|
delete(additionalProperties, "passages")
|
|
delete(additionalProperties, "project")
|
|
delete(additionalProperties, "sections")
|
|
delete(additionalProperties, "size")
|
|
delete(additionalProperties, "stage")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "total")
|
|
delete(additionalProperties, "type")
|
|
delete(additionalProperties, "updated")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableKnowledgeFile struct {
|
|
value *KnowledgeFile
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableKnowledgeFile) Get() *KnowledgeFile {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableKnowledgeFile) Set(val *KnowledgeFile) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableKnowledgeFile) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableKnowledgeFile) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableKnowledgeFile(val *KnowledgeFile) *NullableKnowledgeFile {
|
|
return &NullableKnowledgeFile{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableKnowledgeFile) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableKnowledgeFile) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|