The micro-VM for AI agents — light enough to embed on your laptop, elastic enough to power an agentic cloud.
/*
BoxLite
BoxLite AI platform API Docs
API version: 1.0
Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package apiclient
import (
"encoding/json"
"fmt"
)
// checks if the AdminBoxOverviewPage type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AdminBoxOverviewPage{}
// AdminBoxOverviewPage struct for AdminBoxOverviewPage
type AdminBoxOverviewPage struct {
// Opaque cursor for the next page
NextCursor NullableString `json:"nextCursor,omitempty"`
Limit float32 `json:"limit"`
Items []AdminBoxOverview `json:"items"`
AdditionalProperties map[string]interface{}
}
type _AdminBoxOverviewPage AdminBoxOverviewPage
// NewAdminBoxOverviewPage instantiates a new AdminBoxOverviewPage 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 NewAdminBoxOverviewPage(limit float32, items []AdminBoxOverview) *AdminBoxOverviewPage {
this := AdminBoxOverviewPage{}
this.Limit = limit
this.Items = items
return &this
}
// NewAdminBoxOverviewPageWithDefaults instantiates a new AdminBoxOverviewPage 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 NewAdminBoxOverviewPageWithDefaults() *AdminBoxOverviewPage {
this := AdminBoxOverviewPage{}
return &this
}
// GetNextCursor returns the NextCursor field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AdminBoxOverviewPage) GetNextCursor() string {
if o == nil || IsNil(o.NextCursor.Get()) {
var ret string
return ret
}
return *o.NextCursor.Get()
}
// GetNextCursorOk returns a tuple with the NextCursor 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 *AdminBoxOverviewPage) GetNextCursorOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.NextCursor.Get(), o.NextCursor.IsSet()
}
// HasNextCursor returns a boolean if a field has been set.
func (o *AdminBoxOverviewPage) HasNextCursor() bool {
if o != nil && o.NextCursor.IsSet() {
return true
}
return false
}
// SetNextCursor gets a reference to the given NullableString and assigns it to the NextCursor field.
func (o *AdminBoxOverviewPage) SetNextCursor(v string) {
o.NextCursor.Set(&v)
}
// SetNextCursorNil sets the value for NextCursor to be an explicit nil
func (o *AdminBoxOverviewPage) SetNextCursorNil() {
o.NextCursor.Set(nil)
}
// UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil
func (o *AdminBoxOverviewPage) UnsetNextCursor() {
o.NextCursor.Unset()
}
// GetLimit returns the Limit field value
func (o *AdminBoxOverviewPage) GetLimit() float32 {
if o == nil {
var ret float32
return ret
}
return o.Limit
}
// GetLimitOk returns a tuple with the Limit field value
// and a boolean to check if the value has been set.
func (o *AdminBoxOverviewPage) GetLimitOk() (*float32, bool) {
if o == nil {
return nil, false
}
return &o.Limit, true
}
// SetLimit sets field value
func (o *AdminBoxOverviewPage) SetLimit(v float32) {
o.Limit = v
}
// GetItems returns the Items field value
func (o *AdminBoxOverviewPage) GetItems() []AdminBoxOverview {
if o == nil {
var ret []AdminBoxOverview
return ret
}
return o.Items
}
// GetItemsOk returns a tuple with the Items field value
// and a boolean to check if the value has been set.
func (o *AdminBoxOverviewPage) GetItemsOk() ([]AdminBoxOverview, bool) {
if o == nil {
return nil, false
}
return o.Items, true
}
// SetItems sets field value
func (o *AdminBoxOverviewPage) SetItems(v []AdminBoxOverview) {
o.Items = v
}
func (o AdminBoxOverviewPage) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AdminBoxOverviewPage) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.NextCursor.IsSet() {
toSerialize["nextCursor"] = o.NextCursor.Get()
}
toSerialize["limit"] = o.Limit
toSerialize["items"] = o.Items
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AdminBoxOverviewPage) UnmarshalJSON(data []byte) (err error) {
// This validates that all required properties are included in the JSON object
// by unmarshalling the object into a generic map with string keys and checking
// that every required field exists as a key in the generic map.
requiredProperties := []string{
"limit",
"items",
}
allProperties := make(map[string]interface{})
err = json.Unmarshal(data, &allProperties)
if err != nil {
return err;
}
for _, requiredProperty := range(requiredProperties) {
if _, exists := allProperties[requiredProperty]; !exists {
return fmt.Errorf("no value given for required property %v", requiredProperty)
}
}
varAdminBoxOverviewPage := _AdminBoxOverviewPage{}
err = json.Unmarshal(data, &varAdminBoxOverviewPage)
if err != nil {
return err
}
*o = AdminBoxOverviewPage(varAdminBoxOverviewPage)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "nextCursor")
delete(additionalProperties, "limit")
delete(additionalProperties, "items")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAdminBoxOverviewPage struct {
value *AdminBoxOverviewPage
isSet bool
}
func (v NullableAdminBoxOverviewPage) Get() *AdminBoxOverviewPage {
return v.value
}
func (v *NullableAdminBoxOverviewPage) Set(val *AdminBoxOverviewPage) {
v.value = val
v.isSet = true
}
func (v NullableAdminBoxOverviewPage) IsSet() bool {
return v.isSet
}
func (v *NullableAdminBoxOverviewPage) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAdminBoxOverviewPage(val *AdminBoxOverviewPage) *NullableAdminBoxOverviewPage {
return &NullableAdminBoxOverviewPage{value: val, isSet: true}
}
func (v NullableAdminBoxOverviewPage) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAdminBoxOverviewPage) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}