/*
Daytona

Daytona AI platform API Docs

API version: 1.0
Contact: support@daytona.com
*/

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package apiclient

import (
	"encoding/json"
	"fmt"
)

// checks if the Sandbox type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Sandbox{}

// Sandbox struct for Sandbox
type Sandbox struct {
	// The ID of the sandbox
	Id string `json:"id"`
	// The organization ID of the sandbox
	OrganizationId string `json:"organizationId"`
	// The name of the sandbox
	Name string `json:"name"`
	// The snapshot used for the sandbox
	Snapshot *string `json:"snapshot,omitempty"`
	// The user associated with the project
	User string `json:"user"`
	// Environment variables for the sandbox
	Env map[string]string `json:"env"`
	// Labels for the sandbox
	Labels map[string]string `json:"labels"`
	// Whether the sandbox http preview is public
	Public bool `json:"public"`
	// Whether to block all network access for the sandbox
	NetworkBlockAll bool `json:"networkBlockAll"`
	// Comma-separated list of allowed CIDR network addresses for the sandbox
	NetworkAllowList *string `json:"networkAllowList,omitempty"`
	// The target environment for the sandbox
	Target string `json:"target"`
	// The CPU quota for the sandbox
	Cpu float32 `json:"cpu"`
	// The GPU quota for the sandbox
	Gpu float32 `json:"gpu"`
	// The memory quota for the sandbox
	Memory float32 `json:"memory"`
	// The disk quota for the sandbox
	Disk float32 `json:"disk"`
	// The state of the sandbox
	State *SandboxState `json:"state,omitempty"`
	// The desired state of the sandbox
	DesiredState *SandboxDesiredState `json:"desiredState,omitempty"`
	// The error reason of the sandbox
	ErrorReason *string `json:"errorReason,omitempty"`
	// Whether the sandbox error is recoverable.
	Recoverable *bool `json:"recoverable,omitempty"`
	// The state of the backup
	BackupState *string `json:"backupState,omitempty"`
	// The creation timestamp of the last backup
	BackupCreatedAt *string `json:"backupCreatedAt,omitempty"`
	// Auto-stop interval in minutes (0 means disabled)
	AutoStopInterval *float32 `json:"autoStopInterval,omitempty"`
	// Auto-archive interval in minutes
	AutoArchiveInterval *float32 `json:"autoArchiveInterval,omitempty"`
	// Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
	AutoDeleteInterval *float32 `json:"autoDeleteInterval,omitempty"`
	// Array of volumes attached to the sandbox
	Volumes []SandboxVolume `json:"volumes,omitempty"`
	// Build information for the sandbox
	BuildInfo *BuildInfo `json:"buildInfo,omitempty"`
	// The creation timestamp of the sandbox
	CreatedAt *string `json:"createdAt,omitempty"`
	// The last update timestamp of the sandbox
	UpdatedAt *string `json:"updatedAt,omitempty"`
	// The last activity timestamp of the sandbox
	LastActivityAt *string `json:"lastActivityAt,omitempty"`
	// The class of the sandbox
	// Deprecated
	Class *string `json:"class,omitempty"`
	// The version of the daemon running in the sandbox
	DaemonVersion *string `json:"daemonVersion,omitempty"`
	// The runner ID of the sandbox
	RunnerId *string `json:"runnerId,omitempty"`
	// The toolbox proxy URL for the sandbox
	ToolboxProxyUrl string `json:"toolboxProxyUrl"`
	AdditionalProperties map[string]interface{}
}

type _Sandbox Sandbox

// NewSandbox instantiates a new Sandbox 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 NewSandbox(id string, organizationId string, name string, user string, env map[string]string, labels map[string]string, public bool, networkBlockAll bool, target string, cpu float32, gpu float32, memory float32, disk float32, toolboxProxyUrl string) *Sandbox {
	this := Sandbox{}
	this.Id = id
	this.OrganizationId = organizationId
	this.Name = name
	this.User = user
	this.Env = env
	this.Labels = labels
	this.Public = public
	this.NetworkBlockAll = networkBlockAll
	this.Target = target
	this.Cpu = cpu
	this.Gpu = gpu
	this.Memory = memory
	this.Disk = disk
	this.ToolboxProxyUrl = toolboxProxyUrl
	return &this
}

// NewSandboxWithDefaults instantiates a new Sandbox 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 NewSandboxWithDefaults() *Sandbox {
	this := Sandbox{}
	return &this
}

// GetId returns the Id field value
func (o *Sandbox) 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 *Sandbox) GetIdOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Id, true
}

// SetId sets field value
func (o *Sandbox) SetId(v string) {
	o.Id = v
}

// GetOrganizationId returns the OrganizationId field value
func (o *Sandbox) GetOrganizationId() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.OrganizationId
}

// GetOrganizationIdOk returns a tuple with the OrganizationId field value
// and a boolean to check if the value has been set.
func (o *Sandbox) GetOrganizationIdOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.OrganizationId, true
}

// SetOrganizationId sets field value
func (o *Sandbox) SetOrganizationId(v string) {
	o.OrganizationId = v
}

// GetName returns the Name field value
func (o *Sandbox) GetName() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Name
}

// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *Sandbox) GetNameOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Name, true
}

// SetName sets field value
func (o *Sandbox) SetName(v string) {
	o.Name = v
}

// GetSnapshot returns the Snapshot field value if set, zero value otherwise.
func (o *Sandbox) GetSnapshot() string {
	if o == nil || IsNil(o.Snapshot) {
		var ret string
		return ret
	}
	return *o.Snapshot
}

// GetSnapshotOk returns a tuple with the Snapshot field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sandbox) GetSnapshotOk() (*string, bool) {
	if o == nil || IsNil(o.Snapshot) {
		return nil, false
	}
	return o.Snapshot, true
}

// HasSnapshot returns a boolean if a field has been set.
func (o *Sandbox) HasSnapshot() bool {
	if o != nil && !IsNil(o.Snapshot) {
		return true
	}

	return false
}

// SetSnapshot gets a reference to the given string and assigns it to the Snapshot field.
func (o *Sandbox) SetSnapshot(v string) {
	o.Snapshot = &v
}

// GetUser returns the User field value
func (o *Sandbox) GetUser() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.User
}

// GetUserOk returns a tuple with the User field value
// and a boolean to check if the value has been set.
func (o *Sandbox) GetUserOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.User, true
}

// SetUser sets field value
func (o *Sandbox) SetUser(v string) {
	o.User = v
}

// GetEnv returns the Env field value
func (o *Sandbox) GetEnv() map[string]string {
	if o == nil {
		var ret map[string]string
		return ret
	}

	return o.Env
}

// GetEnvOk returns a tuple with the Env field value
// and a boolean to check if the value has been set.
func (o *Sandbox) GetEnvOk() (*map[string]string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Env, true
}

// SetEnv sets field value
func (o *Sandbox) SetEnv(v map[string]string) {
	o.Env = v
}

// GetLabels returns the Labels field value
func (o *Sandbox) GetLabels() map[string]string {
	if o == nil {
		var ret map[string]string
		return ret
	}

	return o.Labels
}

// GetLabelsOk returns a tuple with the Labels field value
// and a boolean to check if the value has been set.
func (o *Sandbox) GetLabelsOk() (*map[string]string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Labels, true
}

// SetLabels sets field value
func (o *Sandbox) SetLabels(v map[string]string) {
	o.Labels = v
}

// GetPublic returns the Public field value
func (o *Sandbox) GetPublic() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.Public
}

// GetPublicOk returns a tuple with the Public field value
// and a boolean to check if the value has been set.
func (o *Sandbox) GetPublicOk() (*bool, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Public, true
}

// SetPublic sets field value
func (o *Sandbox) SetPublic(v bool) {
	o.Public = v
}

// GetNetworkBlockAll returns the NetworkBlockAll field value
func (o *Sandbox) GetNetworkBlockAll() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.NetworkBlockAll
}

// GetNetworkBlockAllOk returns a tuple with the NetworkBlockAll field value
// and a boolean to check if the value has been set.
func (o *Sandbox) GetNetworkBlockAllOk() (*bool, bool) {
	if o == nil {
		return nil, false
	}
	return &o.NetworkBlockAll, true
}

// SetNetworkBlockAll sets field value
func (o *Sandbox) SetNetworkBlockAll(v bool) {
	o.NetworkBlockAll = v
}

// GetNetworkAllowList returns the NetworkAllowList field value if set, zero value otherwise.
func (o *Sandbox) GetNetworkAllowList() string {
	if o == nil || IsNil(o.NetworkAllowList) {
		var ret string
		return ret
	}
	return *o.NetworkAllowList
}

// GetNetworkAllowListOk returns a tuple with the NetworkAllowList field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sandbox) GetNetworkAllowListOk() (*string, bool) {
	if o == nil || IsNil(o.NetworkAllowList) {
		return nil, false
	}
	return o.NetworkAllowList, true
}

// HasNetworkAllowList returns a boolean if a field has been set.
func (o *Sandbox) HasNetworkAllowList() bool {
	if o != nil && !IsNil(o.NetworkAllowList) {
		return true
	}

	return false
}

// SetNetworkAllowList gets a reference to the given string and assigns it to the NetworkAllowList field.
func (o *Sandbox) SetNetworkAllowList(v string) {
	o.NetworkAllowList = &v
}

// GetTarget returns the Target field value
func (o *Sandbox) GetTarget() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Target
}

// GetTargetOk returns a tuple with the Target field value
// and a boolean to check if the value has been set.
func (o *Sandbox) GetTargetOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Target, true
}

// SetTarget sets field value
func (o *Sandbox) SetTarget(v string) {
	o.Target = v
}

// GetCpu returns the Cpu field value
func (o *Sandbox) GetCpu() float32 {
	if o == nil {
		var ret float32
		return ret
	}

	return o.Cpu
}

// GetCpuOk returns a tuple with the Cpu field value
// and a boolean to check if the value has been set.
func (o *Sandbox) GetCpuOk() (*float32, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Cpu, true
}

// SetCpu sets field value
func (o *Sandbox) SetCpu(v float32) {
	o.Cpu = v
}

// GetGpu returns the Gpu field value
func (o *Sandbox) GetGpu() float32 {
	if o == nil {
		var ret float32
		return ret
	}

	return o.Gpu
}

// GetGpuOk returns a tuple with the Gpu field value
// and a boolean to check if the value has been set.
func (o *Sandbox) GetGpuOk() (*float32, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Gpu, true
}

// SetGpu sets field value
func (o *Sandbox) SetGpu(v float32) {
	o.Gpu = v
}

// GetMemory returns the Memory field value
func (o *Sandbox) GetMemory() float32 {
	if o == nil {
		var ret float32
		return ret
	}

	return o.Memory
}

// GetMemoryOk returns a tuple with the Memory field value
// and a boolean to check if the value has been set.
func (o *Sandbox) GetMemoryOk() (*float32, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Memory, true
}

// SetMemory sets field value
func (o *Sandbox) SetMemory(v float32) {
	o.Memory = v
}

// GetDisk returns the Disk field value
func (o *Sandbox) GetDisk() float32 {
	if o == nil {
		var ret float32
		return ret
	}

	return o.Disk
}

// GetDiskOk returns a tuple with the Disk field value
// and a boolean to check if the value has been set.
func (o *Sandbox) GetDiskOk() (*float32, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Disk, true
}

// SetDisk sets field value
func (o *Sandbox) SetDisk(v float32) {
	o.Disk = v
}

// GetState returns the State field value if set, zero value otherwise.
func (o *Sandbox) GetState() SandboxState {
	if o == nil || IsNil(o.State) {
		var ret SandboxState
		return ret
	}
	return *o.State
}

// GetStateOk returns a tuple with the State field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sandbox) GetStateOk() (*SandboxState, bool) {
	if o == nil || IsNil(o.State) {
		return nil, false
	}
	return o.State, true
}

// HasState returns a boolean if a field has been set.
func (o *Sandbox) HasState() bool {
	if o != nil && !IsNil(o.State) {
		return true
	}

	return false
}

// SetState gets a reference to the given SandboxState and assigns it to the State field.
func (o *Sandbox) SetState(v SandboxState) {
	o.State = &v
}

// GetDesiredState returns the DesiredState field value if set, zero value otherwise.
func (o *Sandbox) GetDesiredState() SandboxDesiredState {
	if o == nil || IsNil(o.DesiredState) {
		var ret SandboxDesiredState
		return ret
	}
	return *o.DesiredState
}

// GetDesiredStateOk returns a tuple with the DesiredState field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sandbox) GetDesiredStateOk() (*SandboxDesiredState, bool) {
	if o == nil || IsNil(o.DesiredState) {
		return nil, false
	}
	return o.DesiredState, true
}

// HasDesiredState returns a boolean if a field has been set.
func (o *Sandbox) HasDesiredState() bool {
	if o != nil && !IsNil(o.DesiredState) {
		return true
	}

	return false
}

// SetDesiredState gets a reference to the given SandboxDesiredState and assigns it to the DesiredState field.
func (o *Sandbox) SetDesiredState(v SandboxDesiredState) {
	o.DesiredState = &v
}

// GetErrorReason returns the ErrorReason field value if set, zero value otherwise.
func (o *Sandbox) GetErrorReason() string {
	if o == nil || IsNil(o.ErrorReason) {
		var ret string
		return ret
	}
	return *o.ErrorReason
}

// GetErrorReasonOk returns a tuple with the ErrorReason field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sandbox) GetErrorReasonOk() (*string, bool) {
	if o == nil || IsNil(o.ErrorReason) {
		return nil, false
	}
	return o.ErrorReason, true
}

// HasErrorReason returns a boolean if a field has been set.
func (o *Sandbox) HasErrorReason() bool {
	if o != nil && !IsNil(o.ErrorReason) {
		return true
	}

	return false
}

// SetErrorReason gets a reference to the given string and assigns it to the ErrorReason field.
func (o *Sandbox) SetErrorReason(v string) {
	o.ErrorReason = &v
}

// GetRecoverable returns the Recoverable field value if set, zero value otherwise.
func (o *Sandbox) GetRecoverable() bool {
	if o == nil || IsNil(o.Recoverable) {
		var ret bool
		return ret
	}
	return *o.Recoverable
}

// GetRecoverableOk returns a tuple with the Recoverable field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sandbox) GetRecoverableOk() (*bool, bool) {
	if o == nil || IsNil(o.Recoverable) {
		return nil, false
	}
	return o.Recoverable, true
}

// HasRecoverable returns a boolean if a field has been set.
func (o *Sandbox) HasRecoverable() bool {
	if o != nil && !IsNil(o.Recoverable) {
		return true
	}

	return false
}

// SetRecoverable gets a reference to the given bool and assigns it to the Recoverable field.
func (o *Sandbox) SetRecoverable(v bool) {
	o.Recoverable = &v
}

// GetBackupState returns the BackupState field value if set, zero value otherwise.
func (o *Sandbox) GetBackupState() string {
	if o == nil || IsNil(o.BackupState) {
		var ret string
		return ret
	}
	return *o.BackupState
}

// GetBackupStateOk returns a tuple with the BackupState field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sandbox) GetBackupStateOk() (*string, bool) {
	if o == nil || IsNil(o.BackupState) {
		return nil, false
	}
	return o.BackupState, true
}

// HasBackupState returns a boolean if a field has been set.
func (o *Sandbox) HasBackupState() bool {
	if o != nil && !IsNil(o.BackupState) {
		return true
	}

	return false
}

// SetBackupState gets a reference to the given string and assigns it to the BackupState field.
func (o *Sandbox) SetBackupState(v string) {
	o.BackupState = &v
}

// GetBackupCreatedAt returns the BackupCreatedAt field value if set, zero value otherwise.
func (o *Sandbox) GetBackupCreatedAt() string {
	if o == nil || IsNil(o.BackupCreatedAt) {
		var ret string
		return ret
	}
	return *o.BackupCreatedAt
}

// GetBackupCreatedAtOk returns a tuple with the BackupCreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sandbox) GetBackupCreatedAtOk() (*string, bool) {
	if o == nil || IsNil(o.BackupCreatedAt) {
		return nil, false
	}
	return o.BackupCreatedAt, true
}

// HasBackupCreatedAt returns a boolean if a field has been set.
func (o *Sandbox) HasBackupCreatedAt() bool {
	if o != nil && !IsNil(o.BackupCreatedAt) {
		return true
	}

	return false
}

// SetBackupCreatedAt gets a reference to the given string and assigns it to the BackupCreatedAt field.
func (o *Sandbox) SetBackupCreatedAt(v string) {
	o.BackupCreatedAt = &v
}

// GetAutoStopInterval returns the AutoStopInterval field value if set, zero value otherwise.
func (o *Sandbox) GetAutoStopInterval() float32 {
	if o == nil || IsNil(o.AutoStopInterval) {
		var ret float32
		return ret
	}
	return *o.AutoStopInterval
}

// GetAutoStopIntervalOk returns a tuple with the AutoStopInterval field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sandbox) GetAutoStopIntervalOk() (*float32, bool) {
	if o == nil || IsNil(o.AutoStopInterval) {
		return nil, false
	}
	return o.AutoStopInterval, true
}

// HasAutoStopInterval returns a boolean if a field has been set.
func (o *Sandbox) HasAutoStopInterval() bool {
	if o != nil && !IsNil(o.AutoStopInterval) {
		return true
	}

	return false
}

// SetAutoStopInterval gets a reference to the given float32 and assigns it to the AutoStopInterval field.
func (o *Sandbox) SetAutoStopInterval(v float32) {
	o.AutoStopInterval = &v
}

// GetAutoArchiveInterval returns the AutoArchiveInterval field value if set, zero value otherwise.
func (o *Sandbox) GetAutoArchiveInterval() float32 {
	if o == nil || IsNil(o.AutoArchiveInterval) {
		var ret float32
		return ret
	}
	return *o.AutoArchiveInterval
}

// GetAutoArchiveIntervalOk returns a tuple with the AutoArchiveInterval field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sandbox) GetAutoArchiveIntervalOk() (*float32, bool) {
	if o == nil || IsNil(o.AutoArchiveInterval) {
		return nil, false
	}
	return o.AutoArchiveInterval, true
}

// HasAutoArchiveInterval returns a boolean if a field has been set.
func (o *Sandbox) HasAutoArchiveInterval() bool {
	if o != nil && !IsNil(o.AutoArchiveInterval) {
		return true
	}

	return false
}

// SetAutoArchiveInterval gets a reference to the given float32 and assigns it to the AutoArchiveInterval field.
func (o *Sandbox) SetAutoArchiveInterval(v float32) {
	o.AutoArchiveInterval = &v
}

// GetAutoDeleteInterval returns the AutoDeleteInterval field value if set, zero value otherwise.
func (o *Sandbox) GetAutoDeleteInterval() float32 {
	if o == nil || IsNil(o.AutoDeleteInterval) {
		var ret float32
		return ret
	}
	return *o.AutoDeleteInterval
}

// GetAutoDeleteIntervalOk returns a tuple with the AutoDeleteInterval field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sandbox) GetAutoDeleteIntervalOk() (*float32, bool) {
	if o == nil || IsNil(o.AutoDeleteInterval) {
		return nil, false
	}
	return o.AutoDeleteInterval, true
}

// HasAutoDeleteInterval returns a boolean if a field has been set.
func (o *Sandbox) HasAutoDeleteInterval() bool {
	if o != nil && !IsNil(o.AutoDeleteInterval) {
		return true
	}

	return false
}

// SetAutoDeleteInterval gets a reference to the given float32 and assigns it to the AutoDeleteInterval field.
func (o *Sandbox) SetAutoDeleteInterval(v float32) {
	o.AutoDeleteInterval = &v
}

// GetVolumes returns the Volumes field value if set, zero value otherwise.
func (o *Sandbox) GetVolumes() []SandboxVolume {
	if o == nil || IsNil(o.Volumes) {
		var ret []SandboxVolume
		return ret
	}
	return o.Volumes
}

// GetVolumesOk returns a tuple with the Volumes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sandbox) GetVolumesOk() ([]SandboxVolume, bool) {
	if o == nil || IsNil(o.Volumes) {
		return nil, false
	}
	return o.Volumes, true
}

// HasVolumes returns a boolean if a field has been set.
func (o *Sandbox) HasVolumes() bool {
	if o != nil && !IsNil(o.Volumes) {
		return true
	}

	return false
}

// SetVolumes gets a reference to the given []SandboxVolume and assigns it to the Volumes field.
func (o *Sandbox) SetVolumes(v []SandboxVolume) {
	o.Volumes = v
}

// GetBuildInfo returns the BuildInfo field value if set, zero value otherwise.
func (o *Sandbox) GetBuildInfo() BuildInfo {
	if o == nil || IsNil(o.BuildInfo) {
		var ret BuildInfo
		return ret
	}
	return *o.BuildInfo
}

// GetBuildInfoOk returns a tuple with the BuildInfo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sandbox) GetBuildInfoOk() (*BuildInfo, bool) {
	if o == nil || IsNil(o.BuildInfo) {
		return nil, false
	}
	return o.BuildInfo, true
}

// HasBuildInfo returns a boolean if a field has been set.
func (o *Sandbox) HasBuildInfo() bool {
	if o != nil && !IsNil(o.BuildInfo) {
		return true
	}

	return false
}

// SetBuildInfo gets a reference to the given BuildInfo and assigns it to the BuildInfo field.
func (o *Sandbox) SetBuildInfo(v BuildInfo) {
	o.BuildInfo = &v
}

// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *Sandbox) GetCreatedAt() string {
	if o == nil || IsNil(o.CreatedAt) {
		var ret string
		return ret
	}
	return *o.CreatedAt
}

// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sandbox) GetCreatedAtOk() (*string, bool) {
	if o == nil || IsNil(o.CreatedAt) {
		return nil, false
	}
	return o.CreatedAt, true
}

// HasCreatedAt returns a boolean if a field has been set.
func (o *Sandbox) HasCreatedAt() bool {
	if o != nil && !IsNil(o.CreatedAt) {
		return true
	}

	return false
}

// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field.
func (o *Sandbox) SetCreatedAt(v string) {
	o.CreatedAt = &v
}

// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *Sandbox) GetUpdatedAt() string {
	if o == nil || IsNil(o.UpdatedAt) {
		var ret string
		return ret
	}
	return *o.UpdatedAt
}

// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sandbox) GetUpdatedAtOk() (*string, bool) {
	if o == nil || IsNil(o.UpdatedAt) {
		return nil, false
	}
	return o.UpdatedAt, true
}

// HasUpdatedAt returns a boolean if a field has been set.
func (o *Sandbox) HasUpdatedAt() bool {
	if o != nil && !IsNil(o.UpdatedAt) {
		return true
	}

	return false
}

// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field.
func (o *Sandbox) SetUpdatedAt(v string) {
	o.UpdatedAt = &v
}

// GetLastActivityAt returns the LastActivityAt field value if set, zero value otherwise.
func (o *Sandbox) GetLastActivityAt() string {
	if o == nil || IsNil(o.LastActivityAt) {
		var ret string
		return ret
	}
	return *o.LastActivityAt
}

// GetLastActivityAtOk returns a tuple with the LastActivityAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sandbox) GetLastActivityAtOk() (*string, bool) {
	if o == nil || IsNil(o.LastActivityAt) {
		return nil, false
	}
	return o.LastActivityAt, true
}

// HasLastActivityAt returns a boolean if a field has been set.
func (o *Sandbox) HasLastActivityAt() bool {
	if o != nil && !IsNil(o.LastActivityAt) {
		return true
	}

	return false
}

// SetLastActivityAt gets a reference to the given string and assigns it to the LastActivityAt field.
func (o *Sandbox) SetLastActivityAt(v string) {
	o.LastActivityAt = &v
}

// GetClass returns the Class field value if set, zero value otherwise.
// Deprecated
func (o *Sandbox) GetClass() string {
	if o == nil || IsNil(o.Class) {
		var ret string
		return ret
	}
	return *o.Class
}

// GetClassOk returns a tuple with the Class field value if set, nil otherwise
// and a boolean to check if the value has been set.
// Deprecated
func (o *Sandbox) GetClassOk() (*string, bool) {
	if o == nil || IsNil(o.Class) {
		return nil, false
	}
	return o.Class, true
}

// HasClass returns a boolean if a field has been set.
func (o *Sandbox) HasClass() bool {
	if o != nil && !IsNil(o.Class) {
		return true
	}

	return false
}

// SetClass gets a reference to the given string and assigns it to the Class field.
// Deprecated
func (o *Sandbox) SetClass(v string) {
	o.Class = &v
}

// GetDaemonVersion returns the DaemonVersion field value if set, zero value otherwise.
func (o *Sandbox) GetDaemonVersion() string {
	if o == nil || IsNil(o.DaemonVersion) {
		var ret string
		return ret
	}
	return *o.DaemonVersion
}

// GetDaemonVersionOk returns a tuple with the DaemonVersion field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sandbox) GetDaemonVersionOk() (*string, bool) {
	if o == nil || IsNil(o.DaemonVersion) {
		return nil, false
	}
	return o.DaemonVersion, true
}

// HasDaemonVersion returns a boolean if a field has been set.
func (o *Sandbox) HasDaemonVersion() bool {
	if o != nil && !IsNil(o.DaemonVersion) {
		return true
	}

	return false
}

// SetDaemonVersion gets a reference to the given string and assigns it to the DaemonVersion field.
func (o *Sandbox) SetDaemonVersion(v string) {
	o.DaemonVersion = &v
}

// GetRunnerId returns the RunnerId field value if set, zero value otherwise.
func (o *Sandbox) GetRunnerId() string {
	if o == nil || IsNil(o.RunnerId) {
		var ret string
		return ret
	}
	return *o.RunnerId
}

// GetRunnerIdOk returns a tuple with the RunnerId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Sandbox) GetRunnerIdOk() (*string, bool) {
	if o == nil || IsNil(o.RunnerId) {
		return nil, false
	}
	return o.RunnerId, true
}

// HasRunnerId returns a boolean if a field has been set.
func (o *Sandbox) HasRunnerId() bool {
	if o != nil && !IsNil(o.RunnerId) {
		return true
	}

	return false
}

// SetRunnerId gets a reference to the given string and assigns it to the RunnerId field.
func (o *Sandbox) SetRunnerId(v string) {
	o.RunnerId = &v
}

// GetToolboxProxyUrl returns the ToolboxProxyUrl field value
func (o *Sandbox) GetToolboxProxyUrl() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.ToolboxProxyUrl
}

// GetToolboxProxyUrlOk returns a tuple with the ToolboxProxyUrl field value
// and a boolean to check if the value has been set.
func (o *Sandbox) GetToolboxProxyUrlOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.ToolboxProxyUrl, true
}

// SetToolboxProxyUrl sets field value
func (o *Sandbox) SetToolboxProxyUrl(v string) {
	o.ToolboxProxyUrl = v
}

func (o Sandbox) MarshalJSON() ([]byte, error) {
	toSerialize,err := o.ToMap()
	if err != nil {
		return []byte{}, err
	}
	return json.Marshal(toSerialize)
}

func (o Sandbox) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["id"] = o.Id
	toSerialize["organizationId"] = o.OrganizationId
	toSerialize["name"] = o.Name
	if !IsNil(o.Snapshot) {
		toSerialize["snapshot"] = o.Snapshot
	}
	toSerialize["user"] = o.User
	toSerialize["env"] = o.Env
	toSerialize["labels"] = o.Labels
	toSerialize["public"] = o.Public
	toSerialize["networkBlockAll"] = o.NetworkBlockAll
	if !IsNil(o.NetworkAllowList) {
		toSerialize["networkAllowList"] = o.NetworkAllowList
	}
	toSerialize["target"] = o.Target
	toSerialize["cpu"] = o.Cpu
	toSerialize["gpu"] = o.Gpu
	toSerialize["memory"] = o.Memory
	toSerialize["disk"] = o.Disk
	if !IsNil(o.State) {
		toSerialize["state"] = o.State
	}
	if !IsNil(o.DesiredState) {
		toSerialize["desiredState"] = o.DesiredState
	}
	if !IsNil(o.ErrorReason) {
		toSerialize["errorReason"] = o.ErrorReason
	}
	if !IsNil(o.Recoverable) {
		toSerialize["recoverable"] = o.Recoverable
	}
	if !IsNil(o.BackupState) {
		toSerialize["backupState"] = o.BackupState
	}
	if !IsNil(o.BackupCreatedAt) {
		toSerialize["backupCreatedAt"] = o.BackupCreatedAt
	}
	if !IsNil(o.AutoStopInterval) {
		toSerialize["autoStopInterval"] = o.AutoStopInterval
	}
	if !IsNil(o.AutoArchiveInterval) {
		toSerialize["autoArchiveInterval"] = o.AutoArchiveInterval
	}
	if !IsNil(o.AutoDeleteInterval) {
		toSerialize["autoDeleteInterval"] = o.AutoDeleteInterval
	}
	if !IsNil(o.Volumes) {
		toSerialize["volumes"] = o.Volumes
	}
	if !IsNil(o.BuildInfo) {
		toSerialize["buildInfo"] = o.BuildInfo
	}
	if !IsNil(o.CreatedAt) {
		toSerialize["createdAt"] = o.CreatedAt
	}
	if !IsNil(o.UpdatedAt) {
		toSerialize["updatedAt"] = o.UpdatedAt
	}
	if !IsNil(o.LastActivityAt) {
		toSerialize["lastActivityAt"] = o.LastActivityAt
	}
	if !IsNil(o.Class) {
		toSerialize["class"] = o.Class
	}
	if !IsNil(o.DaemonVersion) {
		toSerialize["daemonVersion"] = o.DaemonVersion
	}
	if !IsNil(o.RunnerId) {
		toSerialize["runnerId"] = o.RunnerId
	}
	toSerialize["toolboxProxyUrl"] = o.ToolboxProxyUrl

	for key, value := range o.AdditionalProperties {
		toSerialize[key] = value
	}

	return toSerialize, nil
}

func (o *Sandbox) 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",
		"organizationId",
		"name",
		"user",
		"env",
		"labels",
		"public",
		"networkBlockAll",
		"target",
		"cpu",
		"gpu",
		"memory",
		"disk",
		"toolboxProxyUrl",
	}

	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)
		}
	}

	varSandbox := _Sandbox{}

	err = json.Unmarshal(data, &varSandbox)

	if err != nil {
		return err
	}

	*o = Sandbox(varSandbox)

	additionalProperties := make(map[string]interface{})

	if err = json.Unmarshal(data, &additionalProperties); err == nil {
		delete(additionalProperties, "id")
		delete(additionalProperties, "organizationId")
		delete(additionalProperties, "name")
		delete(additionalProperties, "snapshot")
		delete(additionalProperties, "user")
		delete(additionalProperties, "env")
		delete(additionalProperties, "labels")
		delete(additionalProperties, "public")
		delete(additionalProperties, "networkBlockAll")
		delete(additionalProperties, "networkAllowList")
		delete(additionalProperties, "target")
		delete(additionalProperties, "cpu")
		delete(additionalProperties, "gpu")
		delete(additionalProperties, "memory")
		delete(additionalProperties, "disk")
		delete(additionalProperties, "state")
		delete(additionalProperties, "desiredState")
		delete(additionalProperties, "errorReason")
		delete(additionalProperties, "recoverable")
		delete(additionalProperties, "backupState")
		delete(additionalProperties, "backupCreatedAt")
		delete(additionalProperties, "autoStopInterval")
		delete(additionalProperties, "autoArchiveInterval")
		delete(additionalProperties, "autoDeleteInterval")
		delete(additionalProperties, "volumes")
		delete(additionalProperties, "buildInfo")
		delete(additionalProperties, "createdAt")
		delete(additionalProperties, "updatedAt")
		delete(additionalProperties, "lastActivityAt")
		delete(additionalProperties, "class")
		delete(additionalProperties, "daemonVersion")
		delete(additionalProperties, "runnerId")
		delete(additionalProperties, "toolboxProxyUrl")
		o.AdditionalProperties = additionalProperties
	}

	return err
}

type NullableSandbox struct {
	value *Sandbox
	isSet bool
}

func (v NullableSandbox) Get() *Sandbox {
	return v.value
}

func (v *NullableSandbox) Set(val *Sandbox) {
	v.value = val
	v.isSet = true
}

func (v NullableSandbox) IsSet() bool {
	return v.isSet
}

func (v *NullableSandbox) Unset() {
	v.value = nil
	v.isSet = false
}

func NewNullableSandbox(val *Sandbox) *NullableSandbox {
	return &NullableSandbox{value: val, isSet: true}
}

func (v NullableSandbox) MarshalJSON() ([]byte, error) {
	return json.Marshal(v.value)
}

func (v *NullableSandbox) UnmarshalJSON(src []byte) error {
	v.isSet = true
	return json.Unmarshal(src, &v.value)
}


