mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
383 lines
9.9 KiB
Go
383 lines
9.9 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 KnowledgeTocEntry type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &KnowledgeTocEntry{}
|
|
|
|
// KnowledgeTocEntry struct for KnowledgeTocEntry
|
|
type KnowledgeTocEntry struct {
|
|
// ID is the section's number; 0 is the document itself.
|
|
Id *int64 `json:"id,omitempty"`
|
|
// Level is its depth: 0 for the document, 1 for a top-level heading.
|
|
Level *int64 `json:"level,omitempty"`
|
|
// Parent is the id of the section it sits in; -1 for the document.
|
|
Parent *int64 `json:"parent,omitempty"`
|
|
// Size is how many bytes of the document it spans, subsections included.
|
|
Size *int64 `json:"size,omitempty"`
|
|
// Summary is a one-line account of what it covers.
|
|
Summary *string `json:"summary,omitempty"`
|
|
// Synthetic is true for a section the index cut out of a long run of text the document gave no structure to.
|
|
Synthetic *bool `json:"synthetic,omitempty"`
|
|
// Title is its heading.
|
|
Title *string `json:"title,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _KnowledgeTocEntry KnowledgeTocEntry
|
|
|
|
// NewKnowledgeTocEntry instantiates a new KnowledgeTocEntry 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 NewKnowledgeTocEntry() *KnowledgeTocEntry {
|
|
this := KnowledgeTocEntry{}
|
|
return &this
|
|
}
|
|
|
|
// NewKnowledgeTocEntryWithDefaults instantiates a new KnowledgeTocEntry 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 NewKnowledgeTocEntryWithDefaults() *KnowledgeTocEntry {
|
|
this := KnowledgeTocEntry{}
|
|
return &this
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *KnowledgeTocEntry) GetId() int64 {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret int64
|
|
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 *KnowledgeTocEntry) GetIdOk() (*int64, 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 *KnowledgeTocEntry) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given int64 and assigns it to the Id field.
|
|
func (o *KnowledgeTocEntry) SetId(v int64) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetLevel returns the Level field value if set, zero value otherwise.
|
|
func (o *KnowledgeTocEntry) GetLevel() int64 {
|
|
if o == nil || IsNil(o.Level) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Level
|
|
}
|
|
|
|
// GetLevelOk returns a tuple with the Level field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeTocEntry) GetLevelOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Level) {
|
|
return nil, false
|
|
}
|
|
return o.Level, true
|
|
}
|
|
|
|
// HasLevel returns a boolean if a field has been set.
|
|
func (o *KnowledgeTocEntry) HasLevel() bool {
|
|
if o != nil && !IsNil(o.Level) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLevel gets a reference to the given int64 and assigns it to the Level field.
|
|
func (o *KnowledgeTocEntry) SetLevel(v int64) {
|
|
o.Level = &v
|
|
}
|
|
|
|
// GetParent returns the Parent field value if set, zero value otherwise.
|
|
func (o *KnowledgeTocEntry) GetParent() int64 {
|
|
if o == nil || IsNil(o.Parent) {
|
|
var ret int64
|
|
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 *KnowledgeTocEntry) GetParentOk() (*int64, 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 *KnowledgeTocEntry) HasParent() bool {
|
|
if o != nil && !IsNil(o.Parent) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetParent gets a reference to the given int64 and assigns it to the Parent field.
|
|
func (o *KnowledgeTocEntry) SetParent(v int64) {
|
|
o.Parent = &v
|
|
}
|
|
|
|
// GetSize returns the Size field value if set, zero value otherwise.
|
|
func (o *KnowledgeTocEntry) 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 *KnowledgeTocEntry) 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 *KnowledgeTocEntry) 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 *KnowledgeTocEntry) SetSize(v int64) {
|
|
o.Size = &v
|
|
}
|
|
|
|
// GetSummary returns the Summary field value if set, zero value otherwise.
|
|
func (o *KnowledgeTocEntry) GetSummary() string {
|
|
if o == nil || IsNil(o.Summary) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Summary
|
|
}
|
|
|
|
// GetSummaryOk returns a tuple with the Summary field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeTocEntry) GetSummaryOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Summary) {
|
|
return nil, false
|
|
}
|
|
return o.Summary, true
|
|
}
|
|
|
|
// HasSummary returns a boolean if a field has been set.
|
|
func (o *KnowledgeTocEntry) HasSummary() bool {
|
|
if o != nil && !IsNil(o.Summary) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSummary gets a reference to the given string and assigns it to the Summary field.
|
|
func (o *KnowledgeTocEntry) SetSummary(v string) {
|
|
o.Summary = &v
|
|
}
|
|
|
|
// GetSynthetic returns the Synthetic field value if set, zero value otherwise.
|
|
func (o *KnowledgeTocEntry) GetSynthetic() bool {
|
|
if o == nil || IsNil(o.Synthetic) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Synthetic
|
|
}
|
|
|
|
// GetSyntheticOk returns a tuple with the Synthetic field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeTocEntry) GetSyntheticOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Synthetic) {
|
|
return nil, false
|
|
}
|
|
return o.Synthetic, true
|
|
}
|
|
|
|
// HasSynthetic returns a boolean if a field has been set.
|
|
func (o *KnowledgeTocEntry) HasSynthetic() bool {
|
|
if o != nil && !IsNil(o.Synthetic) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSynthetic gets a reference to the given bool and assigns it to the Synthetic field.
|
|
func (o *KnowledgeTocEntry) SetSynthetic(v bool) {
|
|
o.Synthetic = &v
|
|
}
|
|
|
|
// GetTitle returns the Title field value if set, zero value otherwise.
|
|
func (o *KnowledgeTocEntry) GetTitle() string {
|
|
if o == nil || IsNil(o.Title) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Title
|
|
}
|
|
|
|
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeTocEntry) GetTitleOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Title) {
|
|
return nil, false
|
|
}
|
|
return o.Title, true
|
|
}
|
|
|
|
// HasTitle returns a boolean if a field has been set.
|
|
func (o *KnowledgeTocEntry) HasTitle() bool {
|
|
if o != nil && !IsNil(o.Title) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTitle gets a reference to the given string and assigns it to the Title field.
|
|
func (o *KnowledgeTocEntry) SetTitle(v string) {
|
|
o.Title = &v
|
|
}
|
|
|
|
func (o KnowledgeTocEntry) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o KnowledgeTocEntry) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Level) {
|
|
toSerialize["level"] = o.Level
|
|
}
|
|
if !IsNil(o.Parent) {
|
|
toSerialize["parent"] = o.Parent
|
|
}
|
|
if !IsNil(o.Size) {
|
|
toSerialize["size"] = o.Size
|
|
}
|
|
if !IsNil(o.Summary) {
|
|
toSerialize["summary"] = o.Summary
|
|
}
|
|
if !IsNil(o.Synthetic) {
|
|
toSerialize["synthetic"] = o.Synthetic
|
|
}
|
|
if !IsNil(o.Title) {
|
|
toSerialize["title"] = o.Title
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *KnowledgeTocEntry) UnmarshalJSON(data []byte) (err error) {
|
|
varKnowledgeTocEntry := _KnowledgeTocEntry{}
|
|
|
|
err = json.Unmarshal(data, &varKnowledgeTocEntry)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = KnowledgeTocEntry(varKnowledgeTocEntry)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "level")
|
|
delete(additionalProperties, "parent")
|
|
delete(additionalProperties, "size")
|
|
delete(additionalProperties, "summary")
|
|
delete(additionalProperties, "synthetic")
|
|
delete(additionalProperties, "title")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableKnowledgeTocEntry struct {
|
|
value *KnowledgeTocEntry
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableKnowledgeTocEntry) Get() *KnowledgeTocEntry {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableKnowledgeTocEntry) Set(val *KnowledgeTocEntry) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableKnowledgeTocEntry) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableKnowledgeTocEntry) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableKnowledgeTocEntry(val *KnowledgeTocEntry) *NullableKnowledgeTocEntry {
|
|
return &NullableKnowledgeTocEntry{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableKnowledgeTocEntry) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableKnowledgeTocEntry) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|