mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
7.0 KiB
Go
269 lines
7.0 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 KnowledgeFileEntity type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &KnowledgeFileEntity{}
|
|
|
|
// KnowledgeFileEntity struct for KnowledgeFileEntity
|
|
type KnowledgeFileEntity struct {
|
|
// Files is how many other files of the org name it too.
|
|
Files *int64 `json:"files,omitempty"`
|
|
// Kind is person, org, product, place or term.
|
|
Kind *string `json:"kind,omitempty"`
|
|
// Name is the entity as the text names it.
|
|
Name *string `json:"name,omitempty"`
|
|
// Sections is how many of the file's sections name it.
|
|
Sections *int64 `json:"sections,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _KnowledgeFileEntity KnowledgeFileEntity
|
|
|
|
// NewKnowledgeFileEntity instantiates a new KnowledgeFileEntity 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 NewKnowledgeFileEntity() *KnowledgeFileEntity {
|
|
this := KnowledgeFileEntity{}
|
|
return &this
|
|
}
|
|
|
|
// NewKnowledgeFileEntityWithDefaults instantiates a new KnowledgeFileEntity 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 NewKnowledgeFileEntityWithDefaults() *KnowledgeFileEntity {
|
|
this := KnowledgeFileEntity{}
|
|
return &this
|
|
}
|
|
|
|
// GetFiles returns the Files field value if set, zero value otherwise.
|
|
func (o *KnowledgeFileEntity) GetFiles() int64 {
|
|
if o == nil || IsNil(o.Files) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Files
|
|
}
|
|
|
|
// GetFilesOk returns a tuple with the Files field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFileEntity) GetFilesOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Files) {
|
|
return nil, false
|
|
}
|
|
return o.Files, true
|
|
}
|
|
|
|
// HasFiles returns a boolean if a field has been set.
|
|
func (o *KnowledgeFileEntity) HasFiles() bool {
|
|
if o != nil && !IsNil(o.Files) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFiles gets a reference to the given int64 and assigns it to the Files field.
|
|
func (o *KnowledgeFileEntity) SetFiles(v int64) {
|
|
o.Files = &v
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *KnowledgeFileEntity) GetKind() string {
|
|
if o == nil || IsNil(o.Kind) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Kind
|
|
}
|
|
|
|
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeFileEntity) GetKindOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Kind) {
|
|
return nil, false
|
|
}
|
|
return o.Kind, true
|
|
}
|
|
|
|
// HasKind returns a boolean if a field has been set.
|
|
func (o *KnowledgeFileEntity) HasKind() bool {
|
|
if o != nil && !IsNil(o.Kind) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKind gets a reference to the given string and assigns it to the Kind field.
|
|
func (o *KnowledgeFileEntity) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *KnowledgeFileEntity) 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 *KnowledgeFileEntity) 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 *KnowledgeFileEntity) 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 *KnowledgeFileEntity) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetSections returns the Sections field value if set, zero value otherwise.
|
|
func (o *KnowledgeFileEntity) 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 *KnowledgeFileEntity) 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 *KnowledgeFileEntity) 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 *KnowledgeFileEntity) SetSections(v int64) {
|
|
o.Sections = &v
|
|
}
|
|
|
|
func (o KnowledgeFileEntity) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o KnowledgeFileEntity) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Files) {
|
|
toSerialize["files"] = o.Files
|
|
}
|
|
if !IsNil(o.Kind) {
|
|
toSerialize["kind"] = o.Kind
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Sections) {
|
|
toSerialize["sections"] = o.Sections
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *KnowledgeFileEntity) UnmarshalJSON(data []byte) (err error) {
|
|
varKnowledgeFileEntity := _KnowledgeFileEntity{}
|
|
|
|
err = json.Unmarshal(data, &varKnowledgeFileEntity)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = KnowledgeFileEntity(varKnowledgeFileEntity)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "files")
|
|
delete(additionalProperties, "kind")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "sections")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableKnowledgeFileEntity struct {
|
|
value *KnowledgeFileEntity
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableKnowledgeFileEntity) Get() *KnowledgeFileEntity {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableKnowledgeFileEntity) Set(val *KnowledgeFileEntity) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableKnowledgeFileEntity) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableKnowledgeFileEntity) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableKnowledgeFileEntity(val *KnowledgeFileEntity) *NullableKnowledgeFileEntity {
|
|
return &NullableKnowledgeFileEntity{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableKnowledgeFileEntity) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableKnowledgeFileEntity) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|