Files
sdk/model_pricing_pricing_model_list.go

231 lines
6.7 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 PricingPricingModelList type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PricingPricingModelList{}
// PricingPricingModelList struct for PricingPricingModelList
type PricingPricingModelList struct {
// Models are the catalog entries visible to the caller, each an opaque object exactly as the pricing source emits it, with any admin override merged on top. An admin additionally sees hidden entries, each annotated under \"_overlay\".
Models []map[string]interface{} `json:"models,omitempty"`
// Total is how many models this answer carries — recounted over the visible set, not the catalog's own total.
Total *int64 `json:"total,omitempty"`
Updated interface{} `json:"updated,omitempty"`
AdditionalProperties map[string]interface{}
}
type _PricingPricingModelList PricingPricingModelList
// NewPricingPricingModelList instantiates a new PricingPricingModelList 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 NewPricingPricingModelList() *PricingPricingModelList {
this := PricingPricingModelList{}
return &this
}
// NewPricingPricingModelListWithDefaults instantiates a new PricingPricingModelList 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 NewPricingPricingModelListWithDefaults() *PricingPricingModelList {
this := PricingPricingModelList{}
return &this
}
// GetModels returns the Models field value if set, zero value otherwise.
func (o *PricingPricingModelList) GetModels() []map[string]interface{} {
if o == nil || IsNil(o.Models) {
var ret []map[string]interface{}
return ret
}
return o.Models
}
// GetModelsOk returns a tuple with the Models field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PricingPricingModelList) GetModelsOk() ([]map[string]interface{}, bool) {
if o == nil || IsNil(o.Models) {
return nil, false
}
return o.Models, true
}
// HasModels returns a boolean if a field has been set.
func (o *PricingPricingModelList) HasModels() bool {
if o != nil && !IsNil(o.Models) {
return true
}
return false
}
// SetModels gets a reference to the given []map[string]interface{} and assigns it to the Models field.
func (o *PricingPricingModelList) SetModels(v []map[string]interface{}) {
o.Models = v
}
// GetTotal returns the Total field value if set, zero value otherwise.
func (o *PricingPricingModelList) GetTotal() int64 {
if o == nil || IsNil(o.Total) {
var ret int64
return ret
}
return *o.Total
}
// GetTotalOk returns a tuple with the Total field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PricingPricingModelList) GetTotalOk() (*int64, bool) {
if o == nil || IsNil(o.Total) {
return nil, false
}
return o.Total, true
}
// HasTotal returns a boolean if a field has been set.
func (o *PricingPricingModelList) HasTotal() bool {
if o != nil && !IsNil(o.Total) {
return true
}
return false
}
// SetTotal gets a reference to the given int64 and assigns it to the Total field.
func (o *PricingPricingModelList) SetTotal(v int64) {
o.Total = &v
}
// GetUpdated returns the Updated field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *PricingPricingModelList) GetUpdated() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Updated
}
// GetUpdatedOk returns a tuple with the Updated field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *PricingPricingModelList) GetUpdatedOk() (*interface{}, bool) {
if o == nil || IsNil(o.Updated) {
return nil, false
}
return &o.Updated, true
}
// HasUpdated returns a boolean if a field has been set.
func (o *PricingPricingModelList) HasUpdated() bool {
if o != nil && !IsNil(o.Updated) {
return true
}
return false
}
// SetUpdated gets a reference to the given interface{} and assigns it to the Updated field.
func (o *PricingPricingModelList) SetUpdated(v interface{}) {
o.Updated = v
}
func (o PricingPricingModelList) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PricingPricingModelList) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Models) {
toSerialize["models"] = o.Models
}
if !IsNil(o.Total) {
toSerialize["total"] = o.Total
}
if o.Updated != nil {
toSerialize["updated"] = o.Updated
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *PricingPricingModelList) UnmarshalJSON(data []byte) (err error) {
varPricingPricingModelList := _PricingPricingModelList{}
err = json.Unmarshal(data, &varPricingPricingModelList)
if err != nil {
return err
}
*o = PricingPricingModelList(varPricingPricingModelList)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "models")
delete(additionalProperties, "total")
delete(additionalProperties, "updated")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullablePricingPricingModelList struct {
value *PricingPricingModelList
isSet bool
}
func (v NullablePricingPricingModelList) Get() *PricingPricingModelList {
return v.value
}
func (v *NullablePricingPricingModelList) Set(val *PricingPricingModelList) {
v.value = val
v.isSet = true
}
func (v NullablePricingPricingModelList) IsSet() bool {
return v.isSet
}
func (v *NullablePricingPricingModelList) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePricingPricingModelList(val *PricingPricingModelList) *NullablePricingPricingModelList {
return &NullablePricingPricingModelList{value: val, isSet: true}
}
func (v NullablePricingPricingModelList) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePricingPricingModelList) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}