Files
sdk/model_pricing_enablement_board.go

193 lines
5.3 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 PricingEnablementBoard type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PricingEnablementBoard{}
// PricingEnablementBoard struct for PricingEnablementBoard
type PricingEnablementBoard struct {
// Items is every managed item, each resolved for the caller.
Items []PricingUserEnablementItem `json:"items,omitempty"`
// Org is the org this view was resolved for; empty for a caller with no validated principal, who sees only the generally-available items.
Org *string `json:"org,omitempty"`
AdditionalProperties map[string]interface{}
}
type _PricingEnablementBoard PricingEnablementBoard
// NewPricingEnablementBoard instantiates a new PricingEnablementBoard 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 NewPricingEnablementBoard() *PricingEnablementBoard {
this := PricingEnablementBoard{}
return &this
}
// NewPricingEnablementBoardWithDefaults instantiates a new PricingEnablementBoard 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 NewPricingEnablementBoardWithDefaults() *PricingEnablementBoard {
this := PricingEnablementBoard{}
return &this
}
// GetItems returns the Items field value if set, zero value otherwise.
func (o *PricingEnablementBoard) GetItems() []PricingUserEnablementItem {
if o == nil || IsNil(o.Items) {
var ret []PricingUserEnablementItem
return ret
}
return o.Items
}
// GetItemsOk returns a tuple with the Items field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PricingEnablementBoard) GetItemsOk() ([]PricingUserEnablementItem, bool) {
if o == nil || IsNil(o.Items) {
return nil, false
}
return o.Items, true
}
// HasItems returns a boolean if a field has been set.
func (o *PricingEnablementBoard) HasItems() bool {
if o != nil && !IsNil(o.Items) {
return true
}
return false
}
// SetItems gets a reference to the given []PricingUserEnablementItem and assigns it to the Items field.
func (o *PricingEnablementBoard) SetItems(v []PricingUserEnablementItem) {
o.Items = v
}
// GetOrg returns the Org field value if set, zero value otherwise.
func (o *PricingEnablementBoard) GetOrg() string {
if o == nil || IsNil(o.Org) {
var ret string
return ret
}
return *o.Org
}
// GetOrgOk returns a tuple with the Org field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PricingEnablementBoard) GetOrgOk() (*string, bool) {
if o == nil || IsNil(o.Org) {
return nil, false
}
return o.Org, true
}
// HasOrg returns a boolean if a field has been set.
func (o *PricingEnablementBoard) HasOrg() bool {
if o != nil && !IsNil(o.Org) {
return true
}
return false
}
// SetOrg gets a reference to the given string and assigns it to the Org field.
func (o *PricingEnablementBoard) SetOrg(v string) {
o.Org = &v
}
func (o PricingEnablementBoard) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PricingEnablementBoard) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Items) {
toSerialize["items"] = o.Items
}
if !IsNil(o.Org) {
toSerialize["org"] = o.Org
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *PricingEnablementBoard) UnmarshalJSON(data []byte) (err error) {
varPricingEnablementBoard := _PricingEnablementBoard{}
err = json.Unmarshal(data, &varPricingEnablementBoard)
if err != nil {
return err
}
*o = PricingEnablementBoard(varPricingEnablementBoard)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "items")
delete(additionalProperties, "org")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullablePricingEnablementBoard struct {
value *PricingEnablementBoard
isSet bool
}
func (v NullablePricingEnablementBoard) Get() *PricingEnablementBoard {
return v.value
}
func (v *NullablePricingEnablementBoard) Set(val *PricingEnablementBoard) {
v.value = val
v.isSet = true
}
func (v NullablePricingEnablementBoard) IsSet() bool {
return v.isSet
}
func (v *NullablePricingEnablementBoard) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePricingEnablementBoard(val *PricingEnablementBoard) *NullablePricingEnablementBoard {
return &NullablePricingEnablementBoard{value: val, isSet: true}
}
func (v NullablePricingEnablementBoard) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePricingEnablementBoard) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}