mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
155 lines
4.1 KiB
Go
155 lines
4.1 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 TaxonomyTaxonomy type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TaxonomyTaxonomy{}
|
|
|
|
// TaxonomyTaxonomy struct for TaxonomyTaxonomy
|
|
type TaxonomyTaxonomy struct {
|
|
// Categories are the groupings, in display order, each with its own taxa.
|
|
Categories []TaxonomyCategory `json:"categories,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TaxonomyTaxonomy TaxonomyTaxonomy
|
|
|
|
// NewTaxonomyTaxonomy instantiates a new TaxonomyTaxonomy 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 NewTaxonomyTaxonomy() *TaxonomyTaxonomy {
|
|
this := TaxonomyTaxonomy{}
|
|
return &this
|
|
}
|
|
|
|
// NewTaxonomyTaxonomyWithDefaults instantiates a new TaxonomyTaxonomy 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 NewTaxonomyTaxonomyWithDefaults() *TaxonomyTaxonomy {
|
|
this := TaxonomyTaxonomy{}
|
|
return &this
|
|
}
|
|
|
|
// GetCategories returns the Categories field value if set, zero value otherwise.
|
|
func (o *TaxonomyTaxonomy) GetCategories() []TaxonomyCategory {
|
|
if o == nil || IsNil(o.Categories) {
|
|
var ret []TaxonomyCategory
|
|
return ret
|
|
}
|
|
return o.Categories
|
|
}
|
|
|
|
// GetCategoriesOk returns a tuple with the Categories field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaxonomyTaxonomy) GetCategoriesOk() ([]TaxonomyCategory, bool) {
|
|
if o == nil || IsNil(o.Categories) {
|
|
return nil, false
|
|
}
|
|
return o.Categories, true
|
|
}
|
|
|
|
// HasCategories returns a boolean if a field has been set.
|
|
func (o *TaxonomyTaxonomy) HasCategories() bool {
|
|
if o != nil && !IsNil(o.Categories) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCategories gets a reference to the given []TaxonomyCategory and assigns it to the Categories field.
|
|
func (o *TaxonomyTaxonomy) SetCategories(v []TaxonomyCategory) {
|
|
o.Categories = v
|
|
}
|
|
|
|
func (o TaxonomyTaxonomy) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TaxonomyTaxonomy) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Categories) {
|
|
toSerialize["categories"] = o.Categories
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TaxonomyTaxonomy) UnmarshalJSON(data []byte) (err error) {
|
|
varTaxonomyTaxonomy := _TaxonomyTaxonomy{}
|
|
|
|
err = json.Unmarshal(data, &varTaxonomyTaxonomy)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TaxonomyTaxonomy(varTaxonomyTaxonomy)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "categories")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTaxonomyTaxonomy struct {
|
|
value *TaxonomyTaxonomy
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTaxonomyTaxonomy) Get() *TaxonomyTaxonomy {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTaxonomyTaxonomy) Set(val *TaxonomyTaxonomy) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTaxonomyTaxonomy) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTaxonomyTaxonomy) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTaxonomyTaxonomy(val *TaxonomyTaxonomy) *NullableTaxonomyTaxonomy {
|
|
return &NullableTaxonomyTaxonomy{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTaxonomyTaxonomy) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTaxonomyTaxonomy) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|