mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
6.3 KiB
Go
231 lines
6.3 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 KnowledgePickedSection type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &KnowledgePickedSection{}
|
|
|
|
// KnowledgePickedSection struct for KnowledgePickedSection
|
|
type KnowledgePickedSection struct {
|
|
// File is the file it is in.
|
|
File *KnowledgeFileBrief `json:"file,omitempty"`
|
|
// Section is where it is.
|
|
Section *KnowledgeSectionBrief `json:"section,omitempty"`
|
|
// Summary is its one-line account.
|
|
Summary *string `json:"summary,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _KnowledgePickedSection KnowledgePickedSection
|
|
|
|
// NewKnowledgePickedSection instantiates a new KnowledgePickedSection 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 NewKnowledgePickedSection() *KnowledgePickedSection {
|
|
this := KnowledgePickedSection{}
|
|
return &this
|
|
}
|
|
|
|
// NewKnowledgePickedSectionWithDefaults instantiates a new KnowledgePickedSection 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 NewKnowledgePickedSectionWithDefaults() *KnowledgePickedSection {
|
|
this := KnowledgePickedSection{}
|
|
return &this
|
|
}
|
|
|
|
// GetFile returns the File field value if set, zero value otherwise.
|
|
func (o *KnowledgePickedSection) 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 *KnowledgePickedSection) 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 *KnowledgePickedSection) 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 *KnowledgePickedSection) SetFile(v KnowledgeFileBrief) {
|
|
o.File = &v
|
|
}
|
|
|
|
// GetSection returns the Section field value if set, zero value otherwise.
|
|
func (o *KnowledgePickedSection) 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 *KnowledgePickedSection) 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 *KnowledgePickedSection) 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 *KnowledgePickedSection) SetSection(v KnowledgeSectionBrief) {
|
|
o.Section = &v
|
|
}
|
|
|
|
// GetSummary returns the Summary field value if set, zero value otherwise.
|
|
func (o *KnowledgePickedSection) 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 *KnowledgePickedSection) 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 *KnowledgePickedSection) 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 *KnowledgePickedSection) SetSummary(v string) {
|
|
o.Summary = &v
|
|
}
|
|
|
|
func (o KnowledgePickedSection) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o KnowledgePickedSection) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.File) {
|
|
toSerialize["file"] = o.File
|
|
}
|
|
if !IsNil(o.Section) {
|
|
toSerialize["section"] = o.Section
|
|
}
|
|
if !IsNil(o.Summary) {
|
|
toSerialize["summary"] = o.Summary
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *KnowledgePickedSection) UnmarshalJSON(data []byte) (err error) {
|
|
varKnowledgePickedSection := _KnowledgePickedSection{}
|
|
|
|
err = json.Unmarshal(data, &varKnowledgePickedSection)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = KnowledgePickedSection(varKnowledgePickedSection)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "file")
|
|
delete(additionalProperties, "section")
|
|
delete(additionalProperties, "summary")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableKnowledgePickedSection struct {
|
|
value *KnowledgePickedSection
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableKnowledgePickedSection) Get() *KnowledgePickedSection {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableKnowledgePickedSection) Set(val *KnowledgePickedSection) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableKnowledgePickedSection) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableKnowledgePickedSection) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableKnowledgePickedSection(val *KnowledgePickedSection) *NullableKnowledgePickedSection {
|
|
return &NullableKnowledgePickedSection{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableKnowledgePickedSection) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableKnowledgePickedSection) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|