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 AdminBoxJobReferencePage type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AdminBoxJobReferencePage{}
// AdminBoxJobReferencePage struct for AdminBoxJobReferencePage
type AdminBoxJobReferencePage struct {
// Opaque cursor for the next page
NextCursor NullableString `json:"nextCursor,omitempty"`
Limit float32 `json:"limit"`
Items []AdminBoxJobReference `json:"items"`
AdditionalProperties map[string]interface{}
}
type _AdminBoxJobReferencePage AdminBoxJobReferencePage
// NewAdminBoxJobReferencePage instantiates a new AdminBoxJobReferencePage 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 NewAdminBoxJobReferencePage(limit float32, items []AdminBoxJobReference) *AdminBoxJobReferencePage {
this := AdminBoxJobReferencePage{}
this.Limit = limit
this.Items = items
return &this
}
// NewAdminBoxJobReferencePageWithDefaults instantiates a new AdminBoxJobReferencePage 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 NewAdminBoxJobReferencePageWithDefaults() *AdminBoxJobReferencePage {
this := AdminBoxJobReferencePage{}
return &this
}
// GetNextCursor returns the NextCursor field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AdminBoxJobReferencePage) 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 *AdminBoxJobReferencePage) 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 *AdminBoxJobReferencePage) 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 *AdminBoxJobReferencePage) SetNextCursor(v string) {
o.NextCursor.Set(&v)
}
// SetNextCursorNil sets the value for NextCursor to be an explicit nil
func (o *AdminBoxJobReferencePage) SetNextCursorNil() {
o.NextCursor.Set(nil)
}
// UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil
func (o *AdminBoxJobReferencePage) UnsetNextCursor() {
o.NextCursor.Unset()
}
// GetLimit returns the Limit field value
func (o *AdminBoxJobReferencePage) 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 *AdminBoxJobReferencePage) GetLimitOk() (*float32, bool) {
if o == nil {
return nil, false
}
return &o.Limit, true
}
// SetLimit sets field value
func (o *AdminBoxJobReferencePage) SetLimit(v float32) {
o.Limit = v
}
// GetItems returns the Items field value
func (o *AdminBoxJobReferencePage) GetItems() []AdminBoxJobReference {
if o == nil {
var ret []AdminBoxJobReference
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 *AdminBoxJobReferencePage) GetItemsOk() ([]AdminBoxJobReference, bool) {
if o == nil {
return nil, false
}
return o.Items, true
}
// SetItems sets field value
func (o *AdminBoxJobReferencePage) SetItems(v []AdminBoxJobReference) {
o.Items = v
}
func (o AdminBoxJobReferencePage) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AdminBoxJobReferencePage) 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 *AdminBoxJobReferencePage) 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)
}
}
varAdminBoxJobReferencePage := _AdminBoxJobReferencePage{}
err = json.Unmarshal(data, &varAdminBoxJobReferencePage)
if err != nil {
return err
}
*o = AdminBoxJobReferencePage(varAdminBoxJobReferencePage)
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 NullableAdminBoxJobReferencePage struct {
value *AdminBoxJobReferencePage
isSet bool
}
func (v NullableAdminBoxJobReferencePage) Get() *AdminBoxJobReferencePage {
return v.value
}
func (v *NullableAdminBoxJobReferencePage) Set(val *AdminBoxJobReferencePage) {
v.value = val
v.isSet = true
}
func (v NullableAdminBoxJobReferencePage) IsSet() bool {
return v.isSet
}
func (v *NullableAdminBoxJobReferencePage) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAdminBoxJobReferencePage(val *AdminBoxJobReferencePage) *NullableAdminBoxJobReferencePage {
return &NullableAdminBoxJobReferencePage{value: val, isSet: true}
}
func (v NullableAdminBoxJobReferencePage) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAdminBoxJobReferencePage) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}