mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
376 lines
9.0 KiB
Go
376 lines
9.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 TreeFile type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TreeFile{}
|
|
|
|
// TreeFile struct for TreeFile
|
|
type TreeFile struct {
|
|
Children []TreeFile `json:"children,omitempty"`
|
|
CreatedTime *string `json:"createdTime,omitempty"`
|
|
IsLeaf *bool `json:"isLeaf,omitempty"`
|
|
Key *string `json:"key,omitempty"`
|
|
Size *int32 `json:"size,omitempty"`
|
|
Title *string `json:"title,omitempty"`
|
|
Url *string `json:"url,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TreeFile TreeFile
|
|
|
|
// NewTreeFile instantiates a new TreeFile 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 NewTreeFile() *TreeFile {
|
|
this := TreeFile{}
|
|
return &this
|
|
}
|
|
|
|
// NewTreeFileWithDefaults instantiates a new TreeFile 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 NewTreeFileWithDefaults() *TreeFile {
|
|
this := TreeFile{}
|
|
return &this
|
|
}
|
|
|
|
// GetChildren returns the Children field value if set, zero value otherwise.
|
|
func (o *TreeFile) GetChildren() []TreeFile {
|
|
if o == nil || IsNil(o.Children) {
|
|
var ret []TreeFile
|
|
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 *TreeFile) GetChildrenOk() ([]TreeFile, 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 *TreeFile) HasChildren() bool {
|
|
if o != nil && !IsNil(o.Children) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetChildren gets a reference to the given []TreeFile and assigns it to the Children field.
|
|
func (o *TreeFile) SetChildren(v []TreeFile) {
|
|
o.Children = v
|
|
}
|
|
|
|
// GetCreatedTime returns the CreatedTime field value if set, zero value otherwise.
|
|
func (o *TreeFile) GetCreatedTime() string {
|
|
if o == nil || IsNil(o.CreatedTime) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CreatedTime
|
|
}
|
|
|
|
// GetCreatedTimeOk returns a tuple with the CreatedTime field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TreeFile) GetCreatedTimeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CreatedTime) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedTime, true
|
|
}
|
|
|
|
// HasCreatedTime returns a boolean if a field has been set.
|
|
func (o *TreeFile) HasCreatedTime() bool {
|
|
if o != nil && !IsNil(o.CreatedTime) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedTime gets a reference to the given string and assigns it to the CreatedTime field.
|
|
func (o *TreeFile) SetCreatedTime(v string) {
|
|
o.CreatedTime = &v
|
|
}
|
|
|
|
// GetIsLeaf returns the IsLeaf field value if set, zero value otherwise.
|
|
func (o *TreeFile) GetIsLeaf() bool {
|
|
if o == nil || IsNil(o.IsLeaf) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.IsLeaf
|
|
}
|
|
|
|
// GetIsLeafOk returns a tuple with the IsLeaf field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TreeFile) GetIsLeafOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.IsLeaf) {
|
|
return nil, false
|
|
}
|
|
return o.IsLeaf, true
|
|
}
|
|
|
|
// HasIsLeaf returns a boolean if a field has been set.
|
|
func (o *TreeFile) HasIsLeaf() bool {
|
|
if o != nil && !IsNil(o.IsLeaf) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIsLeaf gets a reference to the given bool and assigns it to the IsLeaf field.
|
|
func (o *TreeFile) SetIsLeaf(v bool) {
|
|
o.IsLeaf = &v
|
|
}
|
|
|
|
// GetKey returns the Key field value if set, zero value otherwise.
|
|
func (o *TreeFile) 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 *TreeFile) 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 *TreeFile) 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 *TreeFile) SetKey(v string) {
|
|
o.Key = &v
|
|
}
|
|
|
|
// GetSize returns the Size field value if set, zero value otherwise.
|
|
func (o *TreeFile) GetSize() int32 {
|
|
if o == nil || IsNil(o.Size) {
|
|
var ret int32
|
|
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 *TreeFile) GetSizeOk() (*int32, 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 *TreeFile) HasSize() bool {
|
|
if o != nil && !IsNil(o.Size) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSize gets a reference to the given int32 and assigns it to the Size field.
|
|
func (o *TreeFile) SetSize(v int32) {
|
|
o.Size = &v
|
|
}
|
|
|
|
// GetTitle returns the Title field value if set, zero value otherwise.
|
|
func (o *TreeFile) 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 *TreeFile) 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 *TreeFile) 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 *TreeFile) SetTitle(v string) {
|
|
o.Title = &v
|
|
}
|
|
|
|
// GetUrl returns the Url field value if set, zero value otherwise.
|
|
func (o *TreeFile) GetUrl() string {
|
|
if o == nil || IsNil(o.Url) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Url
|
|
}
|
|
|
|
// GetUrlOk returns a tuple with the Url field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TreeFile) GetUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Url) {
|
|
return nil, false
|
|
}
|
|
return o.Url, true
|
|
}
|
|
|
|
// HasUrl returns a boolean if a field has been set.
|
|
func (o *TreeFile) HasUrl() bool {
|
|
if o != nil && !IsNil(o.Url) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUrl gets a reference to the given string and assigns it to the Url field.
|
|
func (o *TreeFile) SetUrl(v string) {
|
|
o.Url = &v
|
|
}
|
|
|
|
func (o TreeFile) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TreeFile) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Children) {
|
|
toSerialize["children"] = o.Children
|
|
}
|
|
if !IsNil(o.CreatedTime) {
|
|
toSerialize["createdTime"] = o.CreatedTime
|
|
}
|
|
if !IsNil(o.IsLeaf) {
|
|
toSerialize["isLeaf"] = o.IsLeaf
|
|
}
|
|
if !IsNil(o.Key) {
|
|
toSerialize["key"] = o.Key
|
|
}
|
|
if !IsNil(o.Size) {
|
|
toSerialize["size"] = o.Size
|
|
}
|
|
if !IsNil(o.Title) {
|
|
toSerialize["title"] = o.Title
|
|
}
|
|
if !IsNil(o.Url) {
|
|
toSerialize["url"] = o.Url
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TreeFile) UnmarshalJSON(data []byte) (err error) {
|
|
varTreeFile := _TreeFile{}
|
|
|
|
err = json.Unmarshal(data, &varTreeFile)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TreeFile(varTreeFile)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "children")
|
|
delete(additionalProperties, "createdTime")
|
|
delete(additionalProperties, "isLeaf")
|
|
delete(additionalProperties, "key")
|
|
delete(additionalProperties, "size")
|
|
delete(additionalProperties, "title")
|
|
delete(additionalProperties, "url")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTreeFile struct {
|
|
value *TreeFile
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTreeFile) Get() *TreeFile {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTreeFile) Set(val *TreeFile) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTreeFile) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTreeFile) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTreeFile(val *TreeFile) *NullableTreeFile {
|
|
return &NullableTreeFile{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTreeFile) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTreeFile) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|