mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
155 lines
4.0 KiB
Go
155 lines
4.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 PlanPlanToolList type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &PlanPlanToolList{}
|
|
|
|
// PlanPlanToolList struct for PlanPlanToolList
|
|
type PlanPlanToolList struct {
|
|
// Tools are the metered tools, each an opaque object exactly as the catalog emits it — typically name, billing unit and price.
|
|
Tools []interface{} `json:"tools,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _PlanPlanToolList PlanPlanToolList
|
|
|
|
// NewPlanPlanToolList instantiates a new PlanPlanToolList 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 NewPlanPlanToolList() *PlanPlanToolList {
|
|
this := PlanPlanToolList{}
|
|
return &this
|
|
}
|
|
|
|
// NewPlanPlanToolListWithDefaults instantiates a new PlanPlanToolList 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 NewPlanPlanToolListWithDefaults() *PlanPlanToolList {
|
|
this := PlanPlanToolList{}
|
|
return &this
|
|
}
|
|
|
|
// GetTools returns the Tools field value if set, zero value otherwise.
|
|
func (o *PlanPlanToolList) GetTools() []interface{} {
|
|
if o == nil || IsNil(o.Tools) {
|
|
var ret []interface{}
|
|
return ret
|
|
}
|
|
return o.Tools
|
|
}
|
|
|
|
// GetToolsOk returns a tuple with the Tools field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PlanPlanToolList) GetToolsOk() ([]interface{}, bool) {
|
|
if o == nil || IsNil(o.Tools) {
|
|
return nil, false
|
|
}
|
|
return o.Tools, true
|
|
}
|
|
|
|
// HasTools returns a boolean if a field has been set.
|
|
func (o *PlanPlanToolList) HasTools() bool {
|
|
if o != nil && !IsNil(o.Tools) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTools gets a reference to the given []interface{} and assigns it to the Tools field.
|
|
func (o *PlanPlanToolList) SetTools(v []interface{}) {
|
|
o.Tools = v
|
|
}
|
|
|
|
func (o PlanPlanToolList) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o PlanPlanToolList) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Tools) {
|
|
toSerialize["tools"] = o.Tools
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *PlanPlanToolList) UnmarshalJSON(data []byte) (err error) {
|
|
varPlanPlanToolList := _PlanPlanToolList{}
|
|
|
|
err = json.Unmarshal(data, &varPlanPlanToolList)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = PlanPlanToolList(varPlanPlanToolList)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "tools")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullablePlanPlanToolList struct {
|
|
value *PlanPlanToolList
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullablePlanPlanToolList) Get() *PlanPlanToolList {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullablePlanPlanToolList) Set(val *PlanPlanToolList) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullablePlanPlanToolList) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullablePlanPlanToolList) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullablePlanPlanToolList(val *PlanPlanToolList) *NullablePlanPlanToolList {
|
|
return &NullablePlanPlanToolList{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullablePlanPlanToolList) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullablePlanPlanToolList) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|