Skip to content

The micro-VM for AI agents — light enough to embed on your laptop, elastic enough to power an agentic cloud.

28.5 KB
Raw Blame
/*
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 Organization type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Organization{}

// Organization struct for Organization
type Organization struct {
	// App Hosting permissions enabled for this organization.
	AppHostingPermissions []string `json:"appHostingPermissions"`
	Onboarding NullableOnboardingDto `json:"onboarding,omitempty"`
	// Organization ID
	Id string `json:"id"`
	// Organization name
	Name string `json:"name"`
	// User ID of the organization creator
	CreatedBy string `json:"createdBy"`
	// Whether this organization is the authenticated user default organization
	IsDefaultForAuthenticatedUser bool `json:"isDefaultForAuthenticatedUser"`
	// Deprecated alias for isDefaultForAuthenticatedUser. Kept for backward compatibility with older REST clients.
	// Deprecated
	Personal bool `json:"personal"`
	// Creation timestamp
	CreatedAt time.Time `json:"createdAt"`
	// Last update timestamp
	UpdatedAt time.Time `json:"updatedAt"`
	// Suspended flag
	Suspended bool `json:"suspended"`
	// Suspended at
	SuspendedAt time.Time `json:"suspendedAt"`
	// Suspended reason
	SuspensionReason string `json:"suspensionReason"`
	// Suspended until
	SuspendedUntil time.Time `json:"suspendedUntil"`
	// Suspension cleanup grace period hours
	SuspensionCleanupGracePeriodHours float32 `json:"suspensionCleanupGracePeriodHours"`
	// Max CPU per box
	MaxCpuPerBox float32 `json:"maxCpuPerBox"`
	// Max memory per box
	MaxMemoryPerBox float32 `json:"maxMemoryPerBox"`
	// Max disk per box
	MaxDiskPerBox float32 `json:"maxDiskPerBox"`
	// Box default network block all
	BoxLimitedNetworkEgress bool `json:"boxLimitedNetworkEgress"`
	// Default region ID
	DefaultRegionId *string `json:"defaultRegionId,omitempty"`
	// Authenticated rate limit per minute
	AuthenticatedRateLimit NullableFloat32 `json:"authenticatedRateLimit"`
	// Box create rate limit per minute
	BoxCreateRateLimit NullableFloat32 `json:"boxCreateRateLimit"`
	// Box lifecycle rate limit per minute
	BoxLifecycleRateLimit NullableFloat32 `json:"boxLifecycleRateLimit"`
	// Experimental configuration
	ExperimentalConfig map[string]interface{} `json:"experimentalConfig"`
	// Authenticated rate limit TTL in seconds
	AuthenticatedRateLimitTtlSeconds NullableFloat32 `json:"authenticatedRateLimitTtlSeconds"`
	// Box create rate limit TTL in seconds
	BoxCreateRateLimitTtlSeconds NullableFloat32 `json:"boxCreateRateLimitTtlSeconds"`
	// Box lifecycle rate limit TTL in seconds
	BoxLifecycleRateLimitTtlSeconds NullableFloat32 `json:"boxLifecycleRateLimitTtlSeconds"`
	AdditionalProperties map[string]interface{}
}

type _Organization Organization

// NewOrganization instantiates a new Organization 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 NewOrganization(appHostingPermissions []string, id string, name string, createdBy string, isDefaultForAuthenticatedUser bool, personal bool, createdAt time.Time, updatedAt time.Time, suspended bool, suspendedAt time.Time, suspensionReason string, suspendedUntil time.Time, suspensionCleanupGracePeriodHours float32, maxCpuPerBox float32, maxMemoryPerBox float32, maxDiskPerBox float32, boxLimitedNetworkEgress bool, authenticatedRateLimit NullableFloat32, boxCreateRateLimit NullableFloat32, boxLifecycleRateLimit NullableFloat32, experimentalConfig map[string]interface{}, authenticatedRateLimitTtlSeconds NullableFloat32, boxCreateRateLimitTtlSeconds NullableFloat32, boxLifecycleRateLimitTtlSeconds NullableFloat32) *Organization {
	this := Organization{}
	this.AppHostingPermissions = appHostingPermissions
	this.Id = id
	this.Name = name
	this.CreatedBy = createdBy
	this.IsDefaultForAuthenticatedUser = isDefaultForAuthenticatedUser
	this.Personal = personal
	this.CreatedAt = createdAt
	this.UpdatedAt = updatedAt
	this.Suspended = suspended
	this.SuspendedAt = suspendedAt
	this.SuspensionReason = suspensionReason
	this.SuspendedUntil = suspendedUntil
	this.SuspensionCleanupGracePeriodHours = suspensionCleanupGracePeriodHours
	this.MaxCpuPerBox = maxCpuPerBox
	this.MaxMemoryPerBox = maxMemoryPerBox
	this.MaxDiskPerBox = maxDiskPerBox
	this.BoxLimitedNetworkEgress = boxLimitedNetworkEgress
	this.AuthenticatedRateLimit = authenticatedRateLimit
	this.BoxCreateRateLimit = boxCreateRateLimit
	this.BoxLifecycleRateLimit = boxLifecycleRateLimit
	this.ExperimentalConfig = experimentalConfig
	this.AuthenticatedRateLimitTtlSeconds = authenticatedRateLimitTtlSeconds
	this.BoxCreateRateLimitTtlSeconds = boxCreateRateLimitTtlSeconds
	this.BoxLifecycleRateLimitTtlSeconds = boxLifecycleRateLimitTtlSeconds
	return &this
}

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

// GetAppHostingPermissions returns the AppHostingPermissions field value
func (o *Organization) GetAppHostingPermissions() []string {
	if o == nil {
		var ret []string
		return ret
	}

	return o.AppHostingPermissions
}

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

// SetAppHostingPermissions sets field value
func (o *Organization) SetAppHostingPermissions(v []string) {
	o.AppHostingPermissions = v
}

// GetOnboarding returns the Onboarding field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Organization) GetOnboarding() OnboardingDto {
	if o == nil || IsNil(o.Onboarding.Get()) {
		var ret OnboardingDto
		return ret
	}
	return *o.Onboarding.Get()
}

// GetOnboardingOk returns a tuple with the Onboarding 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 *Organization) GetOnboardingOk() (*OnboardingDto, bool) {
	if o == nil {
		return nil, false
	}
	return o.Onboarding.Get(), o.Onboarding.IsSet()
}

// HasOnboarding returns a boolean if a field has been set.
func (o *Organization) HasOnboarding() bool {
	if o != nil && o.Onboarding.IsSet() {
		return true
	}

	return false
}

// SetOnboarding gets a reference to the given NullableOnboardingDto and assigns it to the Onboarding field.
func (o *Organization) SetOnboarding(v OnboardingDto) {
	o.Onboarding.Set(&v)
}
// SetOnboardingNil sets the value for Onboarding to be an explicit nil
func (o *Organization) SetOnboardingNil() {
	o.Onboarding.Set(nil)
}

// UnsetOnboarding ensures that no value is present for Onboarding, not even an explicit nil
func (o *Organization) UnsetOnboarding() {
	o.Onboarding.Unset()
}

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

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

// GetName returns the Name field value
func (o *Organization) 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 *Organization) GetNameOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Name, true
}

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

// GetCreatedBy returns the CreatedBy field value
func (o *Organization) GetCreatedBy() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.CreatedBy
}

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

// SetCreatedBy sets field value
func (o *Organization) SetCreatedBy(v string) {
	o.CreatedBy = v
}

// GetIsDefaultForAuthenticatedUser returns the IsDefaultForAuthenticatedUser field value
func (o *Organization) GetIsDefaultForAuthenticatedUser() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.IsDefaultForAuthenticatedUser
}

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

// SetIsDefaultForAuthenticatedUser sets field value
func (o *Organization) SetIsDefaultForAuthenticatedUser(v bool) {
	o.IsDefaultForAuthenticatedUser = v
}

// GetPersonal returns the Personal field value
// Deprecated
func (o *Organization) GetPersonal() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.Personal
}

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

// SetPersonal sets field value
// Deprecated
func (o *Organization) SetPersonal(v bool) {
	o.Personal = v
}

// GetCreatedAt returns the CreatedAt field value
func (o *Organization) GetCreatedAt() time.Time {
	if o == nil {
		var ret time.Time
		return ret
	}

	return o.CreatedAt
}

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

// SetCreatedAt sets field value
func (o *Organization) SetCreatedAt(v time.Time) {
	o.CreatedAt = v
}

// GetUpdatedAt returns the UpdatedAt field value
func (o *Organization) GetUpdatedAt() time.Time {
	if o == nil {
		var ret time.Time
		return ret
	}

	return o.UpdatedAt
}

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

// SetUpdatedAt sets field value
func (o *Organization) SetUpdatedAt(v time.Time) {
	o.UpdatedAt = v
}

// GetSuspended returns the Suspended field value
func (o *Organization) GetSuspended() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.Suspended
}

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

// SetSuspended sets field value
func (o *Organization) SetSuspended(v bool) {
	o.Suspended = v
}

// GetSuspendedAt returns the SuspendedAt field value
func (o *Organization) GetSuspendedAt() time.Time {
	if o == nil {
		var ret time.Time
		return ret
	}

	return o.SuspendedAt
}

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

// SetSuspendedAt sets field value
func (o *Organization) SetSuspendedAt(v time.Time) {
	o.SuspendedAt = v
}

// GetSuspensionReason returns the SuspensionReason field value
func (o *Organization) GetSuspensionReason() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.SuspensionReason
}

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

// SetSuspensionReason sets field value
func (o *Organization) SetSuspensionReason(v string) {
	o.SuspensionReason = v
}

// GetSuspendedUntil returns the SuspendedUntil field value
func (o *Organization) GetSuspendedUntil() time.Time {
	if o == nil {
		var ret time.Time
		return ret
	}

	return o.SuspendedUntil
}

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

// SetSuspendedUntil sets field value
func (o *Organization) SetSuspendedUntil(v time.Time) {
	o.SuspendedUntil = v
}

// GetSuspensionCleanupGracePeriodHours returns the SuspensionCleanupGracePeriodHours field value
func (o *Organization) GetSuspensionCleanupGracePeriodHours() float32 {
	if o == nil {
		var ret float32
		return ret
	}

	return o.SuspensionCleanupGracePeriodHours
}

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

// SetSuspensionCleanupGracePeriodHours sets field value
func (o *Organization) SetSuspensionCleanupGracePeriodHours(v float32) {
	o.SuspensionCleanupGracePeriodHours = v
}

// GetMaxCpuPerBox returns the MaxCpuPerBox field value
func (o *Organization) GetMaxCpuPerBox() float32 {
	if o == nil {
		var ret float32
		return ret
	}

	return o.MaxCpuPerBox
}

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

// SetMaxCpuPerBox sets field value
func (o *Organization) SetMaxCpuPerBox(v float32) {
	o.MaxCpuPerBox = v
}

// GetMaxMemoryPerBox returns the MaxMemoryPerBox field value
func (o *Organization) GetMaxMemoryPerBox() float32 {
	if o == nil {
		var ret float32
		return ret
	}

	return o.MaxMemoryPerBox
}

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

// SetMaxMemoryPerBox sets field value
func (o *Organization) SetMaxMemoryPerBox(v float32) {
	o.MaxMemoryPerBox = v
}

// GetMaxDiskPerBox returns the MaxDiskPerBox field value
func (o *Organization) GetMaxDiskPerBox() float32 {
	if o == nil {
		var ret float32
		return ret
	}

	return o.MaxDiskPerBox
}

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

// SetMaxDiskPerBox sets field value
func (o *Organization) SetMaxDiskPerBox(v float32) {
	o.MaxDiskPerBox = v
}

// GetBoxLimitedNetworkEgress returns the BoxLimitedNetworkEgress field value
func (o *Organization) GetBoxLimitedNetworkEgress() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.BoxLimitedNetworkEgress
}

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

// SetBoxLimitedNetworkEgress sets field value
func (o *Organization) SetBoxLimitedNetworkEgress(v bool) {
	o.BoxLimitedNetworkEgress = v
}

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

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

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

	return false
}

// SetDefaultRegionId gets a reference to the given string and assigns it to the DefaultRegionId field.
func (o *Organization) SetDefaultRegionId(v string) {
	o.DefaultRegionId = &v
}

// GetAuthenticatedRateLimit returns the AuthenticatedRateLimit field value
// If the value is explicit nil, the zero value for float32 will be returned
func (o *Organization) GetAuthenticatedRateLimit() float32 {
	if o == nil || o.AuthenticatedRateLimit.Get() == nil {
		var ret float32
		return ret
	}

	return *o.AuthenticatedRateLimit.Get()
}

// GetAuthenticatedRateLimitOk returns a tuple with the AuthenticatedRateLimit field value
// 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 *Organization) GetAuthenticatedRateLimitOk() (*float32, bool) {
	if o == nil {
		return nil, false
	}
	return o.AuthenticatedRateLimit.Get(), o.AuthenticatedRateLimit.IsSet()
}

// SetAuthenticatedRateLimit sets field value
func (o *Organization) SetAuthenticatedRateLimit(v float32) {
	o.AuthenticatedRateLimit.Set(&v)
}

// GetBoxCreateRateLimit returns the BoxCreateRateLimit field value
// If the value is explicit nil, the zero value for float32 will be returned
func (o *Organization) GetBoxCreateRateLimit() float32 {
	if o == nil || o.BoxCreateRateLimit.Get() == nil {
		var ret float32
		return ret
	}

	return *o.BoxCreateRateLimit.Get()
}

// GetBoxCreateRateLimitOk returns a tuple with the BoxCreateRateLimit field value
// 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 *Organization) GetBoxCreateRateLimitOk() (*float32, bool) {
	if o == nil {
		return nil, false
	}
	return o.BoxCreateRateLimit.Get(), o.BoxCreateRateLimit.IsSet()
}

// SetBoxCreateRateLimit sets field value
func (o *Organization) SetBoxCreateRateLimit(v float32) {
	o.BoxCreateRateLimit.Set(&v)
}

// GetBoxLifecycleRateLimit returns the BoxLifecycleRateLimit field value
// If the value is explicit nil, the zero value for float32 will be returned
func (o *Organization) GetBoxLifecycleRateLimit() float32 {
	if o == nil || o.BoxLifecycleRateLimit.Get() == nil {
		var ret float32
		return ret
	}

	return *o.BoxLifecycleRateLimit.Get()
}

// GetBoxLifecycleRateLimitOk returns a tuple with the BoxLifecycleRateLimit field value
// 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 *Organization) GetBoxLifecycleRateLimitOk() (*float32, bool) {
	if o == nil {
		return nil, false
	}
	return o.BoxLifecycleRateLimit.Get(), o.BoxLifecycleRateLimit.IsSet()
}

// SetBoxLifecycleRateLimit sets field value
func (o *Organization) SetBoxLifecycleRateLimit(v float32) {
	o.BoxLifecycleRateLimit.Set(&v)
}

// GetExperimentalConfig returns the ExperimentalConfig field value
func (o *Organization) GetExperimentalConfig() map[string]interface{} {
	if o == nil {
		var ret map[string]interface{}
		return ret
	}

	return o.ExperimentalConfig
}

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

// SetExperimentalConfig sets field value
func (o *Organization) SetExperimentalConfig(v map[string]interface{}) {
	o.ExperimentalConfig = v
}

// GetAuthenticatedRateLimitTtlSeconds returns the AuthenticatedRateLimitTtlSeconds field value
// If the value is explicit nil, the zero value for float32 will be returned
func (o *Organization) GetAuthenticatedRateLimitTtlSeconds() float32 {
	if o == nil || o.AuthenticatedRateLimitTtlSeconds.Get() == nil {
		var ret float32
		return ret
	}

	return *o.AuthenticatedRateLimitTtlSeconds.Get()
}

// GetAuthenticatedRateLimitTtlSecondsOk returns a tuple with the AuthenticatedRateLimitTtlSeconds field value
// 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 *Organization) GetAuthenticatedRateLimitTtlSecondsOk() (*float32, bool) {
	if o == nil {
		return nil, false
	}
	return o.AuthenticatedRateLimitTtlSeconds.Get(), o.AuthenticatedRateLimitTtlSeconds.IsSet()
}

// SetAuthenticatedRateLimitTtlSeconds sets field value
func (o *Organization) SetAuthenticatedRateLimitTtlSeconds(v float32) {
	o.AuthenticatedRateLimitTtlSeconds.Set(&v)
}

// GetBoxCreateRateLimitTtlSeconds returns the BoxCreateRateLimitTtlSeconds field value
// If the value is explicit nil, the zero value for float32 will be returned
func (o *Organization) GetBoxCreateRateLimitTtlSeconds() float32 {
	if o == nil || o.BoxCreateRateLimitTtlSeconds.Get() == nil {
		var ret float32
		return ret
	}

	return *o.BoxCreateRateLimitTtlSeconds.Get()
}

// GetBoxCreateRateLimitTtlSecondsOk returns a tuple with the BoxCreateRateLimitTtlSeconds field value
// 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 *Organization) GetBoxCreateRateLimitTtlSecondsOk() (*float32, bool) {
	if o == nil {
		return nil, false
	}
	return o.BoxCreateRateLimitTtlSeconds.Get(), o.BoxCreateRateLimitTtlSeconds.IsSet()
}

// SetBoxCreateRateLimitTtlSeconds sets field value
func (o *Organization) SetBoxCreateRateLimitTtlSeconds(v float32) {
	o.BoxCreateRateLimitTtlSeconds.Set(&v)
}

// GetBoxLifecycleRateLimitTtlSeconds returns the BoxLifecycleRateLimitTtlSeconds field value
// If the value is explicit nil, the zero value for float32 will be returned
func (o *Organization) GetBoxLifecycleRateLimitTtlSeconds() float32 {
	if o == nil || o.BoxLifecycleRateLimitTtlSeconds.Get() == nil {
		var ret float32
		return ret
	}

	return *o.BoxLifecycleRateLimitTtlSeconds.Get()
}

// GetBoxLifecycleRateLimitTtlSecondsOk returns a tuple with the BoxLifecycleRateLimitTtlSeconds field value
// 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 *Organization) GetBoxLifecycleRateLimitTtlSecondsOk() (*float32, bool) {
	if o == nil {
		return nil, false
	}
	return o.BoxLifecycleRateLimitTtlSeconds.Get(), o.BoxLifecycleRateLimitTtlSeconds.IsSet()
}

// SetBoxLifecycleRateLimitTtlSeconds sets field value
func (o *Organization) SetBoxLifecycleRateLimitTtlSeconds(v float32) {
	o.BoxLifecycleRateLimitTtlSeconds.Set(&v)
}

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

func (o Organization) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["appHostingPermissions"] = o.AppHostingPermissions
	if o.Onboarding.IsSet() {
		toSerialize["onboarding"] = o.Onboarding.Get()
	}
	toSerialize["id"] = o.Id
	toSerialize["name"] = o.Name
	toSerialize["createdBy"] = o.CreatedBy
	toSerialize["isDefaultForAuthenticatedUser"] = o.IsDefaultForAuthenticatedUser
	toSerialize["personal"] = o.Personal
	toSerialize["createdAt"] = o.CreatedAt
	toSerialize["updatedAt"] = o.UpdatedAt
	toSerialize["suspended"] = o.Suspended
	toSerialize["suspendedAt"] = o.SuspendedAt
	toSerialize["suspensionReason"] = o.SuspensionReason
	toSerialize["suspendedUntil"] = o.SuspendedUntil
	toSerialize["suspensionCleanupGracePeriodHours"] = o.SuspensionCleanupGracePeriodHours
	toSerialize["maxCpuPerBox"] = o.MaxCpuPerBox
	toSerialize["maxMemoryPerBox"] = o.MaxMemoryPerBox
	toSerialize["maxDiskPerBox"] = o.MaxDiskPerBox
	toSerialize["boxLimitedNetworkEgress"] = o.BoxLimitedNetworkEgress
	if !IsNil(o.DefaultRegionId) {
		toSerialize["defaultRegionId"] = o.DefaultRegionId
	}
	toSerialize["authenticatedRateLimit"] = o.AuthenticatedRateLimit.Get()
	toSerialize["boxCreateRateLimit"] = o.BoxCreateRateLimit.Get()
	toSerialize["boxLifecycleRateLimit"] = o.BoxLifecycleRateLimit.Get()
	toSerialize["experimentalConfig"] = o.ExperimentalConfig
	toSerialize["authenticatedRateLimitTtlSeconds"] = o.AuthenticatedRateLimitTtlSeconds.Get()
	toSerialize["boxCreateRateLimitTtlSeconds"] = o.BoxCreateRateLimitTtlSeconds.Get()
	toSerialize["boxLifecycleRateLimitTtlSeconds"] = o.BoxLifecycleRateLimitTtlSeconds.Get()

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

	return toSerialize, nil
}

func (o *Organization) 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{
		"appHostingPermissions",
		"id",
		"name",
		"createdBy",
		"isDefaultForAuthenticatedUser",
		"personal",
		"createdAt",
		"updatedAt",
		"suspended",
		"suspendedAt",
		"suspensionReason",
		"suspendedUntil",
		"suspensionCleanupGracePeriodHours",
		"maxCpuPerBox",
		"maxMemoryPerBox",
		"maxDiskPerBox",
		"boxLimitedNetworkEgress",
		"authenticatedRateLimit",
		"boxCreateRateLimit",
		"boxLifecycleRateLimit",
		"experimentalConfig",
		"authenticatedRateLimitTtlSeconds",
		"boxCreateRateLimitTtlSeconds",
		"boxLifecycleRateLimitTtlSeconds",
	}

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

	varOrganization := _Organization{}

	err = json.Unmarshal(data, &varOrganization)

	if err != nil {
		return err
	}

	*o = Organization(varOrganization)

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

	if err = json.Unmarshal(data, &additionalProperties); err == nil {
		delete(additionalProperties, "appHostingPermissions")
		delete(additionalProperties, "onboarding")
		delete(additionalProperties, "id")
		delete(additionalProperties, "name")
		delete(additionalProperties, "createdBy")
		delete(additionalProperties, "isDefaultForAuthenticatedUser")
		delete(additionalProperties, "personal")
		delete(additionalProperties, "createdAt")
		delete(additionalProperties, "updatedAt")
		delete(additionalProperties, "suspended")
		delete(additionalProperties, "suspendedAt")
		delete(additionalProperties, "suspensionReason")
		delete(additionalProperties, "suspendedUntil")
		delete(additionalProperties, "suspensionCleanupGracePeriodHours")
		delete(additionalProperties, "maxCpuPerBox")
		delete(additionalProperties, "maxMemoryPerBox")
		delete(additionalProperties, "maxDiskPerBox")
		delete(additionalProperties, "boxLimitedNetworkEgress")
		delete(additionalProperties, "defaultRegionId")
		delete(additionalProperties, "authenticatedRateLimit")
		delete(additionalProperties, "boxCreateRateLimit")
		delete(additionalProperties, "boxLifecycleRateLimit")
		delete(additionalProperties, "experimentalConfig")
		delete(additionalProperties, "authenticatedRateLimitTtlSeconds")
		delete(additionalProperties, "boxCreateRateLimitTtlSeconds")
		delete(additionalProperties, "boxLifecycleRateLimitTtlSeconds")
		o.AdditionalProperties = additionalProperties
	}

	return err
}

type NullableOrganization struct {
	value *Organization
	isSet bool
}

func (v NullableOrganization) Get() *Organization {
	return v.value
}

func (v *NullableOrganization) Set(val *Organization) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableOrganization(val *Organization) *NullableOrganization {
	return &NullableOrganization{value: val, isSet: true}
}

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

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