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"
"time"
"fmt"
)
// checks if the RunnerMemoryIncident type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &RunnerMemoryIncident{}
// RunnerMemoryIncident struct for RunnerMemoryIncident
type RunnerMemoryIncident struct {
// Bigint row ID; keep as a string.
Id string `json:"id"`
RunnerId string `json:"runnerId"`
EventId string `json:"eventId"`
SampledAt time.Time `json:"sampledAt"`
RunnerMemoryPercent float32 `json:"runnerMemoryPercent"`
// Only Boxes whose maximum in the query range belongs to this snapshot; ties use the smaller row ID.
Boxes []BoxMemoryUsageDto `json:"boxes"`
SamplingComplete bool `json:"samplingComplete"`
ReceivedAt time.Time `json:"receivedAt"`
AdditionalProperties map[string]interface{}
}
type _RunnerMemoryIncident RunnerMemoryIncident
// NewRunnerMemoryIncident instantiates a new RunnerMemoryIncident 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 NewRunnerMemoryIncident(id string, runnerId string, eventId string, sampledAt time.Time, runnerMemoryPercent float32, boxes []BoxMemoryUsageDto, samplingComplete bool, receivedAt time.Time) *RunnerMemoryIncident {
this := RunnerMemoryIncident{}
this.Id = id
this.RunnerId = runnerId
this.EventId = eventId
this.SampledAt = sampledAt
this.RunnerMemoryPercent = runnerMemoryPercent
this.Boxes = boxes
this.SamplingComplete = samplingComplete
this.ReceivedAt = receivedAt
return &this
}
// NewRunnerMemoryIncidentWithDefaults instantiates a new RunnerMemoryIncident 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 NewRunnerMemoryIncidentWithDefaults() *RunnerMemoryIncident {
this := RunnerMemoryIncident{}
return &this
}
// GetId returns the Id field value
func (o *RunnerMemoryIncident) GetId() string {
if o == nil {
var ret string
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *RunnerMemoryIncident) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *RunnerMemoryIncident) SetId(v string) {
o.Id = v
}
// GetRunnerId returns the RunnerId field value
func (o *RunnerMemoryIncident) GetRunnerId() string {
if o == nil {
var ret string
return ret
}
return o.RunnerId
}
// GetRunnerIdOk returns a tuple with the RunnerId field value
// and a boolean to check if the value has been set.
func (o *RunnerMemoryIncident) GetRunnerIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.RunnerId, true
}
// SetRunnerId sets field value
func (o *RunnerMemoryIncident) SetRunnerId(v string) {
o.RunnerId = v
}
// GetEventId returns the EventId field value
func (o *RunnerMemoryIncident) GetEventId() string {
if o == nil {
var ret string
return ret
}
return o.EventId
}
// GetEventIdOk returns a tuple with the EventId field value
// and a boolean to check if the value has been set.
func (o *RunnerMemoryIncident) GetEventIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.EventId, true
}
// SetEventId sets field value
func (o *RunnerMemoryIncident) SetEventId(v string) {
o.EventId = v
}
// GetSampledAt returns the SampledAt field value
func (o *RunnerMemoryIncident) GetSampledAt() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.SampledAt
}
// GetSampledAtOk returns a tuple with the SampledAt field value
// and a boolean to check if the value has been set.
func (o *RunnerMemoryIncident) GetSampledAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.SampledAt, true
}
// SetSampledAt sets field value
func (o *RunnerMemoryIncident) SetSampledAt(v time.Time) {
o.SampledAt = v
}
// GetRunnerMemoryPercent returns the RunnerMemoryPercent field value
func (o *RunnerMemoryIncident) GetRunnerMemoryPercent() float32 {
if o == nil {
var ret float32
return ret
}
return o.RunnerMemoryPercent
}
// GetRunnerMemoryPercentOk returns a tuple with the RunnerMemoryPercent field value
// and a boolean to check if the value has been set.
func (o *RunnerMemoryIncident) GetRunnerMemoryPercentOk() (*float32, bool) {
if o == nil {
return nil, false
}
return &o.RunnerMemoryPercent, true
}
// SetRunnerMemoryPercent sets field value
func (o *RunnerMemoryIncident) SetRunnerMemoryPercent(v float32) {
o.RunnerMemoryPercent = v
}
// GetBoxes returns the Boxes field value
func (o *RunnerMemoryIncident) GetBoxes() []BoxMemoryUsageDto {
if o == nil {
var ret []BoxMemoryUsageDto
return ret
}
return o.Boxes
}
// GetBoxesOk returns a tuple with the Boxes field value
// and a boolean to check if the value has been set.
func (o *RunnerMemoryIncident) GetBoxesOk() ([]BoxMemoryUsageDto, bool) {
if o == nil {
return nil, false
}
return o.Boxes, true
}
// SetBoxes sets field value
func (o *RunnerMemoryIncident) SetBoxes(v []BoxMemoryUsageDto) {
o.Boxes = v
}
// GetSamplingComplete returns the SamplingComplete field value
func (o *RunnerMemoryIncident) GetSamplingComplete() bool {
if o == nil {
var ret bool
return ret
}
return o.SamplingComplete
}
// GetSamplingCompleteOk returns a tuple with the SamplingComplete field value
// and a boolean to check if the value has been set.
func (o *RunnerMemoryIncident) GetSamplingCompleteOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.SamplingComplete, true
}
// SetSamplingComplete sets field value
func (o *RunnerMemoryIncident) SetSamplingComplete(v bool) {
o.SamplingComplete = v
}
// GetReceivedAt returns the ReceivedAt field value
func (o *RunnerMemoryIncident) GetReceivedAt() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.ReceivedAt
}
// GetReceivedAtOk returns a tuple with the ReceivedAt field value
// and a boolean to check if the value has been set.
func (o *RunnerMemoryIncident) GetReceivedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.ReceivedAt, true
}
// SetReceivedAt sets field value
func (o *RunnerMemoryIncident) SetReceivedAt(v time.Time) {
o.ReceivedAt = v
}
func (o RunnerMemoryIncident) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o RunnerMemoryIncident) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["id"] = o.Id
toSerialize["runnerId"] = o.RunnerId
toSerialize["eventId"] = o.EventId
toSerialize["sampledAt"] = o.SampledAt
toSerialize["runnerMemoryPercent"] = o.RunnerMemoryPercent
toSerialize["boxes"] = o.Boxes
toSerialize["samplingComplete"] = o.SamplingComplete
toSerialize["receivedAt"] = o.ReceivedAt
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *RunnerMemoryIncident) 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{
"id",
"runnerId",
"eventId",
"sampledAt",
"runnerMemoryPercent",
"boxes",
"samplingComplete",
"receivedAt",
}
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)
}
}
varRunnerMemoryIncident := _RunnerMemoryIncident{}
err = json.Unmarshal(data, &varRunnerMemoryIncident)
if err != nil {
return err
}
*o = RunnerMemoryIncident(varRunnerMemoryIncident)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "id")
delete(additionalProperties, "runnerId")
delete(additionalProperties, "eventId")
delete(additionalProperties, "sampledAt")
delete(additionalProperties, "runnerMemoryPercent")
delete(additionalProperties, "boxes")
delete(additionalProperties, "samplingComplete")
delete(additionalProperties, "receivedAt")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableRunnerMemoryIncident struct {
value *RunnerMemoryIncident
isSet bool
}
func (v NullableRunnerMemoryIncident) Get() *RunnerMemoryIncident {
return v.value
}
func (v *NullableRunnerMemoryIncident) Set(val *RunnerMemoryIncident) {
v.value = val
v.isSet = true
}
func (v NullableRunnerMemoryIncident) IsSet() bool {
return v.isSet
}
func (v *NullableRunnerMemoryIncident) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRunnerMemoryIncident(val *RunnerMemoryIncident) *NullableRunnerMemoryIncident {
return &NullableRunnerMemoryIncident{value: val, isSet: true}
}
func (v NullableRunnerMemoryIncident) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRunnerMemoryIncident) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}