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 AdminJobOverview type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AdminJobOverview{}
// AdminJobOverview struct for AdminJobOverview
type AdminJobOverview struct {
Id string `json:"id"`
Type string `json:"type"`
Status string `json:"status"`
RunnerId NullableString `json:"runnerId,omitempty"`
ResourceType string `json:"resourceType"`
ResourceId string `json:"resourceId"`
CreatedAt NullableTime `json:"createdAt,omitempty"`
StartedAt NullableTime `json:"startedAt,omitempty"`
FinishedAt NullableTime `json:"finishedAt,omitempty"`
DurationMs NullableFloat32 `json:"durationMs,omitempty"`
ErrorCategory NullableString `json:"errorCategory,omitempty"`
ObservedAt NullableTime `json:"observedAt,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AdminJobOverview AdminJobOverview
// NewAdminJobOverview instantiates a new AdminJobOverview 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 NewAdminJobOverview(id string, type_ string, status string, resourceType string, resourceId string) *AdminJobOverview {
this := AdminJobOverview{}
this.Id = id
this.Type = type_
this.Status = status
this.ResourceType = resourceType
this.ResourceId = resourceId
return &this
}
// NewAdminJobOverviewWithDefaults instantiates a new AdminJobOverview 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 NewAdminJobOverviewWithDefaults() *AdminJobOverview {
this := AdminJobOverview{}
return &this
}
// GetId returns the Id field value
func (o *AdminJobOverview) 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 *AdminJobOverview) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *AdminJobOverview) SetId(v string) {
o.Id = v
}
// GetType returns the Type field value
func (o *AdminJobOverview) GetType() string {
if o == nil {
var ret string
return ret
}
return o.Type
}
// GetTypeOk returns a tuple with the Type field value
// and a boolean to check if the value has been set.
func (o *AdminJobOverview) GetTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Type, true
}
// SetType sets field value
func (o *AdminJobOverview) SetType(v string) {
o.Type = v
}
// GetStatus returns the Status field value
func (o *AdminJobOverview) GetStatus() string {
if o == nil {
var ret string
return ret
}
return o.Status
}
// GetStatusOk returns a tuple with the Status field value
// and a boolean to check if the value has been set.
func (o *AdminJobOverview) GetStatusOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Status, true
}
// SetStatus sets field value
func (o *AdminJobOverview) SetStatus(v string) {
o.Status = v
}
// GetRunnerId returns the RunnerId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AdminJobOverview) GetRunnerId() string {
if o == nil || IsNil(o.RunnerId.Get()) {
var ret string
return ret
}
return *o.RunnerId.Get()
}
// GetRunnerIdOk returns a tuple with the RunnerId 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 *AdminJobOverview) GetRunnerIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.RunnerId.Get(), o.RunnerId.IsSet()
}
// HasRunnerId returns a boolean if a field has been set.
func (o *AdminJobOverview) HasRunnerId() bool {
if o != nil && o.RunnerId.IsSet() {
return true
}
return false
}
// SetRunnerId gets a reference to the given NullableString and assigns it to the RunnerId field.
func (o *AdminJobOverview) SetRunnerId(v string) {
o.RunnerId.Set(&v)
}
// SetRunnerIdNil sets the value for RunnerId to be an explicit nil
func (o *AdminJobOverview) SetRunnerIdNil() {
o.RunnerId.Set(nil)
}
// UnsetRunnerId ensures that no value is present for RunnerId, not even an explicit nil
func (o *AdminJobOverview) UnsetRunnerId() {
o.RunnerId.Unset()
}
// GetResourceType returns the ResourceType field value
func (o *AdminJobOverview) GetResourceType() string {
if o == nil {
var ret string
return ret
}
return o.ResourceType
}
// GetResourceTypeOk returns a tuple with the ResourceType field value
// and a boolean to check if the value has been set.
func (o *AdminJobOverview) GetResourceTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ResourceType, true
}
// SetResourceType sets field value
func (o *AdminJobOverview) SetResourceType(v string) {
o.ResourceType = v
}
// GetResourceId returns the ResourceId field value
func (o *AdminJobOverview) GetResourceId() string {
if o == nil {
var ret string
return ret
}
return o.ResourceId
}
// GetResourceIdOk returns a tuple with the ResourceId field value
// and a boolean to check if the value has been set.
func (o *AdminJobOverview) GetResourceIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ResourceId, true
}
// SetResourceId sets field value
func (o *AdminJobOverview) SetResourceId(v string) {
o.ResourceId = v
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AdminJobOverview) GetCreatedAt() time.Time {
if o == nil || IsNil(o.CreatedAt.Get()) {
var ret time.Time
return ret
}
return *o.CreatedAt.Get()
}
// GetCreatedAtOk returns a tuple with the CreatedAt 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 *AdminJobOverview) GetCreatedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return o.CreatedAt.Get(), o.CreatedAt.IsSet()
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *AdminJobOverview) HasCreatedAt() bool {
if o != nil && o.CreatedAt.IsSet() {
return true
}
return false
}
// SetCreatedAt gets a reference to the given NullableTime and assigns it to the CreatedAt field.
func (o *AdminJobOverview) SetCreatedAt(v time.Time) {
o.CreatedAt.Set(&v)
}
// SetCreatedAtNil sets the value for CreatedAt to be an explicit nil
func (o *AdminJobOverview) SetCreatedAtNil() {
o.CreatedAt.Set(nil)
}
// UnsetCreatedAt ensures that no value is present for CreatedAt, not even an explicit nil
func (o *AdminJobOverview) UnsetCreatedAt() {
o.CreatedAt.Unset()
}
// GetStartedAt returns the StartedAt field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AdminJobOverview) GetStartedAt() time.Time {
if o == nil || IsNil(o.StartedAt.Get()) {
var ret time.Time
return ret
}
return *o.StartedAt.Get()
}
// GetStartedAtOk returns a tuple with the StartedAt 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 *AdminJobOverview) GetStartedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return o.StartedAt.Get(), o.StartedAt.IsSet()
}
// HasStartedAt returns a boolean if a field has been set.
func (o *AdminJobOverview) HasStartedAt() bool {
if o != nil && o.StartedAt.IsSet() {
return true
}
return false
}
// SetStartedAt gets a reference to the given NullableTime and assigns it to the StartedAt field.
func (o *AdminJobOverview) SetStartedAt(v time.Time) {
o.StartedAt.Set(&v)
}
// SetStartedAtNil sets the value for StartedAt to be an explicit nil
func (o *AdminJobOverview) SetStartedAtNil() {
o.StartedAt.Set(nil)
}
// UnsetStartedAt ensures that no value is present for StartedAt, not even an explicit nil
func (o *AdminJobOverview) UnsetStartedAt() {
o.StartedAt.Unset()
}
// GetFinishedAt returns the FinishedAt field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AdminJobOverview) GetFinishedAt() time.Time {
if o == nil || IsNil(o.FinishedAt.Get()) {
var ret time.Time
return ret
}
return *o.FinishedAt.Get()
}
// GetFinishedAtOk returns a tuple with the FinishedAt 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 *AdminJobOverview) GetFinishedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return o.FinishedAt.Get(), o.FinishedAt.IsSet()
}
// HasFinishedAt returns a boolean if a field has been set.
func (o *AdminJobOverview) HasFinishedAt() bool {
if o != nil && o.FinishedAt.IsSet() {
return true
}
return false
}
// SetFinishedAt gets a reference to the given NullableTime and assigns it to the FinishedAt field.
func (o *AdminJobOverview) SetFinishedAt(v time.Time) {
o.FinishedAt.Set(&v)
}
// SetFinishedAtNil sets the value for FinishedAt to be an explicit nil
func (o *AdminJobOverview) SetFinishedAtNil() {
o.FinishedAt.Set(nil)
}
// UnsetFinishedAt ensures that no value is present for FinishedAt, not even an explicit nil
func (o *AdminJobOverview) UnsetFinishedAt() {
o.FinishedAt.Unset()
}
// GetDurationMs returns the DurationMs field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AdminJobOverview) GetDurationMs() float32 {
if o == nil || IsNil(o.DurationMs.Get()) {
var ret float32
return ret
}
return *o.DurationMs.Get()
}
// GetDurationMsOk returns a tuple with the DurationMs 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 *AdminJobOverview) GetDurationMsOk() (*float32, bool) {
if o == nil {
return nil, false
}
return o.DurationMs.Get(), o.DurationMs.IsSet()
}
// HasDurationMs returns a boolean if a field has been set.
func (o *AdminJobOverview) HasDurationMs() bool {
if o != nil && o.DurationMs.IsSet() {
return true
}
return false
}
// SetDurationMs gets a reference to the given NullableFloat32 and assigns it to the DurationMs field.
func (o *AdminJobOverview) SetDurationMs(v float32) {
o.DurationMs.Set(&v)
}
// SetDurationMsNil sets the value for DurationMs to be an explicit nil
func (o *AdminJobOverview) SetDurationMsNil() {
o.DurationMs.Set(nil)
}
// UnsetDurationMs ensures that no value is present for DurationMs, not even an explicit nil
func (o *AdminJobOverview) UnsetDurationMs() {
o.DurationMs.Unset()
}
// GetErrorCategory returns the ErrorCategory field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AdminJobOverview) GetErrorCategory() string {
if o == nil || IsNil(o.ErrorCategory.Get()) {
var ret string
return ret
}
return *o.ErrorCategory.Get()
}
// GetErrorCategoryOk returns a tuple with the ErrorCategory 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 *AdminJobOverview) GetErrorCategoryOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.ErrorCategory.Get(), o.ErrorCategory.IsSet()
}
// HasErrorCategory returns a boolean if a field has been set.
func (o *AdminJobOverview) HasErrorCategory() bool {
if o != nil && o.ErrorCategory.IsSet() {
return true
}
return false
}
// SetErrorCategory gets a reference to the given NullableString and assigns it to the ErrorCategory field.
func (o *AdminJobOverview) SetErrorCategory(v string) {
o.ErrorCategory.Set(&v)
}
// SetErrorCategoryNil sets the value for ErrorCategory to be an explicit nil
func (o *AdminJobOverview) SetErrorCategoryNil() {
o.ErrorCategory.Set(nil)
}
// UnsetErrorCategory ensures that no value is present for ErrorCategory, not even an explicit nil
func (o *AdminJobOverview) UnsetErrorCategory() {
o.ErrorCategory.Unset()
}
// GetObservedAt returns the ObservedAt field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AdminJobOverview) GetObservedAt() time.Time {
if o == nil || IsNil(o.ObservedAt.Get()) {
var ret time.Time
return ret
}
return *o.ObservedAt.Get()
}
// GetObservedAtOk returns a tuple with the ObservedAt 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 *AdminJobOverview) GetObservedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return o.ObservedAt.Get(), o.ObservedAt.IsSet()
}
// HasObservedAt returns a boolean if a field has been set.
func (o *AdminJobOverview) HasObservedAt() bool {
if o != nil && o.ObservedAt.IsSet() {
return true
}
return false
}
// SetObservedAt gets a reference to the given NullableTime and assigns it to the ObservedAt field.
func (o *AdminJobOverview) SetObservedAt(v time.Time) {
o.ObservedAt.Set(&v)
}
// SetObservedAtNil sets the value for ObservedAt to be an explicit nil
func (o *AdminJobOverview) SetObservedAtNil() {
o.ObservedAt.Set(nil)
}
// UnsetObservedAt ensures that no value is present for ObservedAt, not even an explicit nil
func (o *AdminJobOverview) UnsetObservedAt() {
o.ObservedAt.Unset()
}
func (o AdminJobOverview) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AdminJobOverview) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["id"] = o.Id
toSerialize["type"] = o.Type
toSerialize["status"] = o.Status
if o.RunnerId.IsSet() {
toSerialize["runnerId"] = o.RunnerId.Get()
}
toSerialize["resourceType"] = o.ResourceType
toSerialize["resourceId"] = o.ResourceId
if o.CreatedAt.IsSet() {
toSerialize["createdAt"] = o.CreatedAt.Get()
}
if o.StartedAt.IsSet() {
toSerialize["startedAt"] = o.StartedAt.Get()
}
if o.FinishedAt.IsSet() {
toSerialize["finishedAt"] = o.FinishedAt.Get()
}
if o.DurationMs.IsSet() {
toSerialize["durationMs"] = o.DurationMs.Get()
}
if o.ErrorCategory.IsSet() {
toSerialize["errorCategory"] = o.ErrorCategory.Get()
}
if o.ObservedAt.IsSet() {
toSerialize["observedAt"] = o.ObservedAt.Get()
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AdminJobOverview) 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",
"type",
"status",
"resourceType",
"resourceId",
}
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)
}
}
varAdminJobOverview := _AdminJobOverview{}
err = json.Unmarshal(data, &varAdminJobOverview)
if err != nil {
return err
}
*o = AdminJobOverview(varAdminJobOverview)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "id")
delete(additionalProperties, "type")
delete(additionalProperties, "status")
delete(additionalProperties, "runnerId")
delete(additionalProperties, "resourceType")
delete(additionalProperties, "resourceId")
delete(additionalProperties, "createdAt")
delete(additionalProperties, "startedAt")
delete(additionalProperties, "finishedAt")
delete(additionalProperties, "durationMs")
delete(additionalProperties, "errorCategory")
delete(additionalProperties, "observedAt")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAdminJobOverview struct {
value *AdminJobOverview
isSet bool
}
func (v NullableAdminJobOverview) Get() *AdminJobOverview {
return v.value
}
func (v *NullableAdminJobOverview) Set(val *AdminJobOverview) {
v.value = val
v.isSet = true
}
func (v NullableAdminJobOverview) IsSet() bool {
return v.isSet
}
func (v *NullableAdminJobOverview) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAdminJobOverview(val *AdminJobOverview) *NullableAdminJobOverview {
return &NullableAdminJobOverview{value: val, isSet: true}
}
func (v NullableAdminJobOverview) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAdminJobOverview) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}