mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
383 lines
10 KiB
Go
383 lines
10 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 KnowledgeSectionOut type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &KnowledgeSectionOut{}
|
|
|
|
// KnowledgeSectionOut struct for KnowledgeSectionOut
|
|
type KnowledgeSectionOut struct {
|
|
// Children are its subsections, to open next.
|
|
Children []KnowledgeTocEntry `json:"children,omitempty"`
|
|
// Entities are the entities it names.
|
|
Entities []KnowledgeFileEntity `json:"entities,omitempty"`
|
|
// File is the file it is in.
|
|
File *KnowledgeFileBrief `json:"file,omitempty"`
|
|
// Links are the sections the graph reaches from it, strongest first.
|
|
Links []KnowledgeSectionLink `json:"links,omitempty"`
|
|
// Section is where it is.
|
|
Section *KnowledgeSectionBrief `json:"section,omitempty"`
|
|
// Summary is its one-line account.
|
|
Summary *string `json:"summary,omitempty"`
|
|
// Text is its own text — up to its first subsection — at most 64 KB.
|
|
Text *string `json:"text,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _KnowledgeSectionOut KnowledgeSectionOut
|
|
|
|
// NewKnowledgeSectionOut instantiates a new KnowledgeSectionOut 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 NewKnowledgeSectionOut() *KnowledgeSectionOut {
|
|
this := KnowledgeSectionOut{}
|
|
return &this
|
|
}
|
|
|
|
// NewKnowledgeSectionOutWithDefaults instantiates a new KnowledgeSectionOut 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 NewKnowledgeSectionOutWithDefaults() *KnowledgeSectionOut {
|
|
this := KnowledgeSectionOut{}
|
|
return &this
|
|
}
|
|
|
|
// GetChildren returns the Children field value if set, zero value otherwise.
|
|
func (o *KnowledgeSectionOut) GetChildren() []KnowledgeTocEntry {
|
|
if o == nil || IsNil(o.Children) {
|
|
var ret []KnowledgeTocEntry
|
|
return ret
|
|
}
|
|
return o.Children
|
|
}
|
|
|
|
// GetChildrenOk returns a tuple with the Children field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeSectionOut) GetChildrenOk() ([]KnowledgeTocEntry, bool) {
|
|
if o == nil || IsNil(o.Children) {
|
|
return nil, false
|
|
}
|
|
return o.Children, true
|
|
}
|
|
|
|
// HasChildren returns a boolean if a field has been set.
|
|
func (o *KnowledgeSectionOut) HasChildren() bool {
|
|
if o != nil && !IsNil(o.Children) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetChildren gets a reference to the given []KnowledgeTocEntry and assigns it to the Children field.
|
|
func (o *KnowledgeSectionOut) SetChildren(v []KnowledgeTocEntry) {
|
|
o.Children = v
|
|
}
|
|
|
|
// GetEntities returns the Entities field value if set, zero value otherwise.
|
|
func (o *KnowledgeSectionOut) GetEntities() []KnowledgeFileEntity {
|
|
if o == nil || IsNil(o.Entities) {
|
|
var ret []KnowledgeFileEntity
|
|
return ret
|
|
}
|
|
return o.Entities
|
|
}
|
|
|
|
// GetEntitiesOk returns a tuple with the Entities field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeSectionOut) GetEntitiesOk() ([]KnowledgeFileEntity, bool) {
|
|
if o == nil || IsNil(o.Entities) {
|
|
return nil, false
|
|
}
|
|
return o.Entities, true
|
|
}
|
|
|
|
// HasEntities returns a boolean if a field has been set.
|
|
func (o *KnowledgeSectionOut) HasEntities() bool {
|
|
if o != nil && !IsNil(o.Entities) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEntities gets a reference to the given []KnowledgeFileEntity and assigns it to the Entities field.
|
|
func (o *KnowledgeSectionOut) SetEntities(v []KnowledgeFileEntity) {
|
|
o.Entities = v
|
|
}
|
|
|
|
// GetFile returns the File field value if set, zero value otherwise.
|
|
func (o *KnowledgeSectionOut) GetFile() KnowledgeFileBrief {
|
|
if o == nil || IsNil(o.File) {
|
|
var ret KnowledgeFileBrief
|
|
return ret
|
|
}
|
|
return *o.File
|
|
}
|
|
|
|
// GetFileOk returns a tuple with the File field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeSectionOut) GetFileOk() (*KnowledgeFileBrief, bool) {
|
|
if o == nil || IsNil(o.File) {
|
|
return nil, false
|
|
}
|
|
return o.File, true
|
|
}
|
|
|
|
// HasFile returns a boolean if a field has been set.
|
|
func (o *KnowledgeSectionOut) HasFile() bool {
|
|
if o != nil && !IsNil(o.File) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFile gets a reference to the given KnowledgeFileBrief and assigns it to the File field.
|
|
func (o *KnowledgeSectionOut) SetFile(v KnowledgeFileBrief) {
|
|
o.File = &v
|
|
}
|
|
|
|
// GetLinks returns the Links field value if set, zero value otherwise.
|
|
func (o *KnowledgeSectionOut) GetLinks() []KnowledgeSectionLink {
|
|
if o == nil || IsNil(o.Links) {
|
|
var ret []KnowledgeSectionLink
|
|
return ret
|
|
}
|
|
return o.Links
|
|
}
|
|
|
|
// GetLinksOk returns a tuple with the Links field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeSectionOut) GetLinksOk() ([]KnowledgeSectionLink, bool) {
|
|
if o == nil || IsNil(o.Links) {
|
|
return nil, false
|
|
}
|
|
return o.Links, true
|
|
}
|
|
|
|
// HasLinks returns a boolean if a field has been set.
|
|
func (o *KnowledgeSectionOut) HasLinks() bool {
|
|
if o != nil && !IsNil(o.Links) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLinks gets a reference to the given []KnowledgeSectionLink and assigns it to the Links field.
|
|
func (o *KnowledgeSectionOut) SetLinks(v []KnowledgeSectionLink) {
|
|
o.Links = v
|
|
}
|
|
|
|
// GetSection returns the Section field value if set, zero value otherwise.
|
|
func (o *KnowledgeSectionOut) GetSection() KnowledgeSectionBrief {
|
|
if o == nil || IsNil(o.Section) {
|
|
var ret KnowledgeSectionBrief
|
|
return ret
|
|
}
|
|
return *o.Section
|
|
}
|
|
|
|
// GetSectionOk returns a tuple with the Section field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeSectionOut) GetSectionOk() (*KnowledgeSectionBrief, bool) {
|
|
if o == nil || IsNil(o.Section) {
|
|
return nil, false
|
|
}
|
|
return o.Section, true
|
|
}
|
|
|
|
// HasSection returns a boolean if a field has been set.
|
|
func (o *KnowledgeSectionOut) HasSection() bool {
|
|
if o != nil && !IsNil(o.Section) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSection gets a reference to the given KnowledgeSectionBrief and assigns it to the Section field.
|
|
func (o *KnowledgeSectionOut) SetSection(v KnowledgeSectionBrief) {
|
|
o.Section = &v
|
|
}
|
|
|
|
// GetSummary returns the Summary field value if set, zero value otherwise.
|
|
func (o *KnowledgeSectionOut) 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 *KnowledgeSectionOut) 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 *KnowledgeSectionOut) 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 *KnowledgeSectionOut) SetSummary(v string) {
|
|
o.Summary = &v
|
|
}
|
|
|
|
// GetText returns the Text field value if set, zero value otherwise.
|
|
func (o *KnowledgeSectionOut) GetText() string {
|
|
if o == nil || IsNil(o.Text) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Text
|
|
}
|
|
|
|
// GetTextOk returns a tuple with the Text field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeSectionOut) GetTextOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Text) {
|
|
return nil, false
|
|
}
|
|
return o.Text, true
|
|
}
|
|
|
|
// HasText returns a boolean if a field has been set.
|
|
func (o *KnowledgeSectionOut) HasText() bool {
|
|
if o != nil && !IsNil(o.Text) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetText gets a reference to the given string and assigns it to the Text field.
|
|
func (o *KnowledgeSectionOut) SetText(v string) {
|
|
o.Text = &v
|
|
}
|
|
|
|
func (o KnowledgeSectionOut) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o KnowledgeSectionOut) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Children) {
|
|
toSerialize["children"] = o.Children
|
|
}
|
|
if !IsNil(o.Entities) {
|
|
toSerialize["entities"] = o.Entities
|
|
}
|
|
if !IsNil(o.File) {
|
|
toSerialize["file"] = o.File
|
|
}
|
|
if !IsNil(o.Links) {
|
|
toSerialize["links"] = o.Links
|
|
}
|
|
if !IsNil(o.Section) {
|
|
toSerialize["section"] = o.Section
|
|
}
|
|
if !IsNil(o.Summary) {
|
|
toSerialize["summary"] = o.Summary
|
|
}
|
|
if !IsNil(o.Text) {
|
|
toSerialize["text"] = o.Text
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *KnowledgeSectionOut) UnmarshalJSON(data []byte) (err error) {
|
|
varKnowledgeSectionOut := _KnowledgeSectionOut{}
|
|
|
|
err = json.Unmarshal(data, &varKnowledgeSectionOut)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = KnowledgeSectionOut(varKnowledgeSectionOut)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "children")
|
|
delete(additionalProperties, "entities")
|
|
delete(additionalProperties, "file")
|
|
delete(additionalProperties, "links")
|
|
delete(additionalProperties, "section")
|
|
delete(additionalProperties, "summary")
|
|
delete(additionalProperties, "text")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableKnowledgeSectionOut struct {
|
|
value *KnowledgeSectionOut
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableKnowledgeSectionOut) Get() *KnowledgeSectionOut {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableKnowledgeSectionOut) Set(val *KnowledgeSectionOut) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableKnowledgeSectionOut) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableKnowledgeSectionOut) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableKnowledgeSectionOut(val *KnowledgeSectionOut) *NullableKnowledgeSectionOut {
|
|
return &NullableKnowledgeSectionOut{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableKnowledgeSectionOut) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableKnowledgeSectionOut) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|