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 TaxonomyCategory type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TaxonomyCategory{}
|
|
|
|
// TaxonomyCategory struct for TaxonomyCategory
|
|
type TaxonomyCategory struct {
|
|
// Brands are the brands whose console shows this category. Absent means every brand.
|
|
Brands []string `json:"brands,omitempty"`
|
|
// ID is the stable slug this category is addressed by, e.g. \"observe\".
|
|
Id *string `json:"id,omitempty"`
|
|
// Label is the display name, e.g. \"Observe\".
|
|
Label *string `json:"label,omitempty"`
|
|
// Order is where the category sits among its siblings, ascending.
|
|
Order *int64 `json:"order,omitempty"`
|
|
// Owner is the org this category belongs to: the platform's own org for a category every tenant sees, or your org for one you added. It tells a console which rows it may offer to edit.
|
|
Owner *string `json:"owner,omitempty"`
|
|
// Summary is the one line describing what the category groups, shown as the header copy on its landing page.
|
|
Summary *string `json:"summary,omitempty"`
|
|
// Taxa are the products filed under this category, in display order.
|
|
Taxa []TaxonomyTaxon `json:"taxa,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TaxonomyCategory TaxonomyCategory
|
|
|
|
// NewTaxonomyCategory instantiates a new TaxonomyCategory 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 NewTaxonomyCategory() *TaxonomyCategory {
|
|
this := TaxonomyCategory{}
|
|
return &this
|
|
}
|
|
|
|
// NewTaxonomyCategoryWithDefaults instantiates a new TaxonomyCategory 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 NewTaxonomyCategoryWithDefaults() *TaxonomyCategory {
|
|
this := TaxonomyCategory{}
|
|
return &this
|
|
}
|
|
|
|
// GetBrands returns the Brands field value if set, zero value otherwise.
|
|
func (o *TaxonomyCategory) GetBrands() []string {
|
|
if o == nil || IsNil(o.Brands) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Brands
|
|
}
|
|
|
|
// GetBrandsOk returns a tuple with the Brands field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaxonomyCategory) GetBrandsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Brands) {
|
|
return nil, false
|
|
}
|
|
return o.Brands, true
|
|
}
|
|
|
|
// HasBrands returns a boolean if a field has been set.
|
|
func (o *TaxonomyCategory) HasBrands() bool {
|
|
if o != nil && !IsNil(o.Brands) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBrands gets a reference to the given []string and assigns it to the Brands field.
|
|
func (o *TaxonomyCategory) SetBrands(v []string) {
|
|
o.Brands = v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *TaxonomyCategory) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaxonomyCategory) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *TaxonomyCategory) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *TaxonomyCategory) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetLabel returns the Label field value if set, zero value otherwise.
|
|
func (o *TaxonomyCategory) GetLabel() string {
|
|
if o == nil || IsNil(o.Label) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Label
|
|
}
|
|
|
|
// GetLabelOk returns a tuple with the Label field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaxonomyCategory) GetLabelOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Label) {
|
|
return nil, false
|
|
}
|
|
return o.Label, true
|
|
}
|
|
|
|
// HasLabel returns a boolean if a field has been set.
|
|
func (o *TaxonomyCategory) HasLabel() bool {
|
|
if o != nil && !IsNil(o.Label) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLabel gets a reference to the given string and assigns it to the Label field.
|
|
func (o *TaxonomyCategory) SetLabel(v string) {
|
|
o.Label = &v
|
|
}
|
|
|
|
// GetOrder returns the Order field value if set, zero value otherwise.
|
|
func (o *TaxonomyCategory) GetOrder() int64 {
|
|
if o == nil || IsNil(o.Order) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Order
|
|
}
|
|
|
|
// GetOrderOk returns a tuple with the Order field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaxonomyCategory) GetOrderOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Order) {
|
|
return nil, false
|
|
}
|
|
return o.Order, true
|
|
}
|
|
|
|
// HasOrder returns a boolean if a field has been set.
|
|
func (o *TaxonomyCategory) HasOrder() bool {
|
|
if o != nil && !IsNil(o.Order) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOrder gets a reference to the given int64 and assigns it to the Order field.
|
|
func (o *TaxonomyCategory) SetOrder(v int64) {
|
|
o.Order = &v
|
|
}
|
|
|
|
// GetOwner returns the Owner field value if set, zero value otherwise.
|
|
func (o *TaxonomyCategory) GetOwner() string {
|
|
if o == nil || IsNil(o.Owner) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Owner
|
|
}
|
|
|
|
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaxonomyCategory) GetOwnerOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Owner) {
|
|
return nil, false
|
|
}
|
|
return o.Owner, true
|
|
}
|
|
|
|
// HasOwner returns a boolean if a field has been set.
|
|
func (o *TaxonomyCategory) HasOwner() bool {
|
|
if o != nil && !IsNil(o.Owner) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOwner gets a reference to the given string and assigns it to the Owner field.
|
|
func (o *TaxonomyCategory) SetOwner(v string) {
|
|
o.Owner = &v
|
|
}
|
|
|
|
// GetSummary returns the Summary field value if set, zero value otherwise.
|
|
func (o *TaxonomyCategory) 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 *TaxonomyCategory) 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 *TaxonomyCategory) 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 *TaxonomyCategory) SetSummary(v string) {
|
|
o.Summary = &v
|
|
}
|
|
|
|
// GetTaxa returns the Taxa field value if set, zero value otherwise.
|
|
func (o *TaxonomyCategory) GetTaxa() []TaxonomyTaxon {
|
|
if o == nil || IsNil(o.Taxa) {
|
|
var ret []TaxonomyTaxon
|
|
return ret
|
|
}
|
|
return o.Taxa
|
|
}
|
|
|
|
// GetTaxaOk returns a tuple with the Taxa field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaxonomyCategory) GetTaxaOk() ([]TaxonomyTaxon, bool) {
|
|
if o == nil || IsNil(o.Taxa) {
|
|
return nil, false
|
|
}
|
|
return o.Taxa, true
|
|
}
|
|
|
|
// HasTaxa returns a boolean if a field has been set.
|
|
func (o *TaxonomyCategory) HasTaxa() bool {
|
|
if o != nil && !IsNil(o.Taxa) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTaxa gets a reference to the given []TaxonomyTaxon and assigns it to the Taxa field.
|
|
func (o *TaxonomyCategory) SetTaxa(v []TaxonomyTaxon) {
|
|
o.Taxa = v
|
|
}
|
|
|
|
func (o TaxonomyCategory) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TaxonomyCategory) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Brands) {
|
|
toSerialize["brands"] = o.Brands
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Label) {
|
|
toSerialize["label"] = o.Label
|
|
}
|
|
if !IsNil(o.Order) {
|
|
toSerialize["order"] = o.Order
|
|
}
|
|
if !IsNil(o.Owner) {
|
|
toSerialize["owner"] = o.Owner
|
|
}
|
|
if !IsNil(o.Summary) {
|
|
toSerialize["summary"] = o.Summary
|
|
}
|
|
if !IsNil(o.Taxa) {
|
|
toSerialize["taxa"] = o.Taxa
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TaxonomyCategory) UnmarshalJSON(data []byte) (err error) {
|
|
varTaxonomyCategory := _TaxonomyCategory{}
|
|
|
|
err = json.Unmarshal(data, &varTaxonomyCategory)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TaxonomyCategory(varTaxonomyCategory)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "brands")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "label")
|
|
delete(additionalProperties, "order")
|
|
delete(additionalProperties, "owner")
|
|
delete(additionalProperties, "summary")
|
|
delete(additionalProperties, "taxa")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTaxonomyCategory struct {
|
|
value *TaxonomyCategory
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTaxonomyCategory) Get() *TaxonomyCategory {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTaxonomyCategory) Set(val *TaxonomyCategory) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTaxonomyCategory) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTaxonomyCategory) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTaxonomyCategory(val *TaxonomyCategory) *NullableTaxonomyCategory {
|
|
return &NullableTaxonomyCategory{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTaxonomyCategory) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTaxonomyCategory) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|