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 BoxliteConfiguration type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &BoxliteConfiguration{}
// BoxliteConfiguration struct for BoxliteConfiguration
type BoxliteConfiguration struct {
Turnstile *TurnstileConfig `json:"turnstile,omitempty"`
// BoxLite version
Version string `json:"version"`
// PostHog configuration
Posthog *PosthogConfig `json:"posthog,omitempty"`
// OIDC configuration
Oidc OidcConfig `json:"oidc"`
// Whether linked accounts are enabled
LinkedAccountsEnabled bool `json:"linkedAccountsEnabled"`
// System announcements
Announcements map[string]Announcement `json:"announcements"`
// Pylon application ID
PylonAppId *string `json:"pylonAppId,omitempty"`
// Proxy template URL
ProxyTemplateUrl string `json:"proxyTemplateUrl"`
// Dashboard URL
DashboardUrl string `json:"dashboardUrl"`
// Whether maintenance mode is enabled
MaintananceMode bool `json:"maintananceMode"`
// Current environment
Environment string `json:"environment"`
// Billing API URL
BillingApiUrl *string `json:"billingApiUrl,omitempty"`
// Analytics API URL
AnalyticsApiUrl *string `json:"analyticsApiUrl,omitempty"`
// Rate limit configuration
RateLimit *RateLimitConfig `json:"rateLimit,omitempty"`
AdditionalProperties map[string]interface{}
}
type _BoxliteConfiguration BoxliteConfiguration
// NewBoxliteConfiguration instantiates a new BoxliteConfiguration 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 NewBoxliteConfiguration(version string, oidc OidcConfig, linkedAccountsEnabled bool, announcements map[string]Announcement, proxyTemplateUrl string, dashboardUrl string, maintananceMode bool, environment string) *BoxliteConfiguration {
this := BoxliteConfiguration{}
this.Version = version
this.Oidc = oidc
this.LinkedAccountsEnabled = linkedAccountsEnabled
this.Announcements = announcements
this.ProxyTemplateUrl = proxyTemplateUrl
this.DashboardUrl = dashboardUrl
this.MaintananceMode = maintananceMode
this.Environment = environment
return &this
}
// NewBoxliteConfigurationWithDefaults instantiates a new BoxliteConfiguration 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 NewBoxliteConfigurationWithDefaults() *BoxliteConfiguration {
this := BoxliteConfiguration{}
return &this
}
// GetTurnstile returns the Turnstile field value if set, zero value otherwise.
func (o *BoxliteConfiguration) GetTurnstile() TurnstileConfig {
if o == nil || IsNil(o.Turnstile) {
var ret TurnstileConfig
return ret
}
return *o.Turnstile
}
// GetTurnstileOk returns a tuple with the Turnstile field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BoxliteConfiguration) GetTurnstileOk() (*TurnstileConfig, bool) {
if o == nil || IsNil(o.Turnstile) {
return nil, false
}
return o.Turnstile, true
}
// HasTurnstile returns a boolean if a field has been set.
func (o *BoxliteConfiguration) HasTurnstile() bool {
if o != nil && !IsNil(o.Turnstile) {
return true
}
return false
}
// SetTurnstile gets a reference to the given TurnstileConfig and assigns it to the Turnstile field.
func (o *BoxliteConfiguration) SetTurnstile(v TurnstileConfig) {
o.Turnstile = &v
}
// GetVersion returns the Version field value
func (o *BoxliteConfiguration) GetVersion() string {
if o == nil {
var ret string
return ret
}
return o.Version
}
// GetVersionOk returns a tuple with the Version field value
// and a boolean to check if the value has been set.
func (o *BoxliteConfiguration) GetVersionOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Version, true
}
// SetVersion sets field value
func (o *BoxliteConfiguration) SetVersion(v string) {
o.Version = v
}
// GetPosthog returns the Posthog field value if set, zero value otherwise.
func (o *BoxliteConfiguration) GetPosthog() PosthogConfig {
if o == nil || IsNil(o.Posthog) {
var ret PosthogConfig
return ret
}
return *o.Posthog
}
// GetPosthogOk returns a tuple with the Posthog field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BoxliteConfiguration) GetPosthogOk() (*PosthogConfig, bool) {
if o == nil || IsNil(o.Posthog) {
return nil, false
}
return o.Posthog, true
}
// HasPosthog returns a boolean if a field has been set.
func (o *BoxliteConfiguration) HasPosthog() bool {
if o != nil && !IsNil(o.Posthog) {
return true
}
return false
}
// SetPosthog gets a reference to the given PosthogConfig and assigns it to the Posthog field.
func (o *BoxliteConfiguration) SetPosthog(v PosthogConfig) {
o.Posthog = &v
}
// GetOidc returns the Oidc field value
func (o *BoxliteConfiguration) GetOidc() OidcConfig {
if o == nil {
var ret OidcConfig
return ret
}
return o.Oidc
}
// GetOidcOk returns a tuple with the Oidc field value
// and a boolean to check if the value has been set.
func (o *BoxliteConfiguration) GetOidcOk() (*OidcConfig, bool) {
if o == nil {
return nil, false
}
return &o.Oidc, true
}
// SetOidc sets field value
func (o *BoxliteConfiguration) SetOidc(v OidcConfig) {
o.Oidc = v
}
// GetLinkedAccountsEnabled returns the LinkedAccountsEnabled field value
func (o *BoxliteConfiguration) GetLinkedAccountsEnabled() bool {
if o == nil {
var ret bool
return ret
}
return o.LinkedAccountsEnabled
}
// GetLinkedAccountsEnabledOk returns a tuple with the LinkedAccountsEnabled field value
// and a boolean to check if the value has been set.
func (o *BoxliteConfiguration) GetLinkedAccountsEnabledOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.LinkedAccountsEnabled, true
}
// SetLinkedAccountsEnabled sets field value
func (o *BoxliteConfiguration) SetLinkedAccountsEnabled(v bool) {
o.LinkedAccountsEnabled = v
}
// GetAnnouncements returns the Announcements field value
func (o *BoxliteConfiguration) GetAnnouncements() map[string]Announcement {
if o == nil {
var ret map[string]Announcement
return ret
}
return o.Announcements
}
// GetAnnouncementsOk returns a tuple with the Announcements field value
// and a boolean to check if the value has been set.
func (o *BoxliteConfiguration) GetAnnouncementsOk() (*map[string]Announcement, bool) {
if o == nil {
return nil, false
}
return &o.Announcements, true
}
// SetAnnouncements sets field value
func (o *BoxliteConfiguration) SetAnnouncements(v map[string]Announcement) {
o.Announcements = v
}
// GetPylonAppId returns the PylonAppId field value if set, zero value otherwise.
func (o *BoxliteConfiguration) GetPylonAppId() string {
if o == nil || IsNil(o.PylonAppId) {
var ret string
return ret
}
return *o.PylonAppId
}
// GetPylonAppIdOk returns a tuple with the PylonAppId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BoxliteConfiguration) GetPylonAppIdOk() (*string, bool) {
if o == nil || IsNil(o.PylonAppId) {
return nil, false
}
return o.PylonAppId, true
}
// HasPylonAppId returns a boolean if a field has been set.
func (o *BoxliteConfiguration) HasPylonAppId() bool {
if o != nil && !IsNil(o.PylonAppId) {
return true
}
return false
}
// SetPylonAppId gets a reference to the given string and assigns it to the PylonAppId field.
func (o *BoxliteConfiguration) SetPylonAppId(v string) {
o.PylonAppId = &v
}
// GetProxyTemplateUrl returns the ProxyTemplateUrl field value
func (o *BoxliteConfiguration) GetProxyTemplateUrl() string {
if o == nil {
var ret string
return ret
}
return o.ProxyTemplateUrl
}
// GetProxyTemplateUrlOk returns a tuple with the ProxyTemplateUrl field value
// and a boolean to check if the value has been set.
func (o *BoxliteConfiguration) GetProxyTemplateUrlOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ProxyTemplateUrl, true
}
// SetProxyTemplateUrl sets field value
func (o *BoxliteConfiguration) SetProxyTemplateUrl(v string) {
o.ProxyTemplateUrl = v
}
// GetDashboardUrl returns the DashboardUrl field value
func (o *BoxliteConfiguration) GetDashboardUrl() string {
if o == nil {
var ret string
return ret
}
return o.DashboardUrl
}
// GetDashboardUrlOk returns a tuple with the DashboardUrl field value
// and a boolean to check if the value has been set.
func (o *BoxliteConfiguration) GetDashboardUrlOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DashboardUrl, true
}
// SetDashboardUrl sets field value
func (o *BoxliteConfiguration) SetDashboardUrl(v string) {
o.DashboardUrl = v
}
// GetMaintananceMode returns the MaintananceMode field value
func (o *BoxliteConfiguration) GetMaintananceMode() bool {
if o == nil {
var ret bool
return ret
}
return o.MaintananceMode
}
// GetMaintananceModeOk returns a tuple with the MaintananceMode field value
// and a boolean to check if the value has been set.
func (o *BoxliteConfiguration) GetMaintananceModeOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.MaintananceMode, true
}
// SetMaintananceMode sets field value
func (o *BoxliteConfiguration) SetMaintananceMode(v bool) {
o.MaintananceMode = v
}
// GetEnvironment returns the Environment field value
func (o *BoxliteConfiguration) GetEnvironment() string {
if o == nil {
var ret string
return ret
}
return o.Environment
}
// GetEnvironmentOk returns a tuple with the Environment field value
// and a boolean to check if the value has been set.
func (o *BoxliteConfiguration) GetEnvironmentOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Environment, true
}
// SetEnvironment sets field value
func (o *BoxliteConfiguration) SetEnvironment(v string) {
o.Environment = v
}
// GetBillingApiUrl returns the BillingApiUrl field value if set, zero value otherwise.
func (o *BoxliteConfiguration) GetBillingApiUrl() string {
if o == nil || IsNil(o.BillingApiUrl) {
var ret string
return ret
}
return *o.BillingApiUrl
}
// GetBillingApiUrlOk returns a tuple with the BillingApiUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BoxliteConfiguration) GetBillingApiUrlOk() (*string, bool) {
if o == nil || IsNil(o.BillingApiUrl) {
return nil, false
}
return o.BillingApiUrl, true
}
// HasBillingApiUrl returns a boolean if a field has been set.
func (o *BoxliteConfiguration) HasBillingApiUrl() bool {
if o != nil && !IsNil(o.BillingApiUrl) {
return true
}
return false
}
// SetBillingApiUrl gets a reference to the given string and assigns it to the BillingApiUrl field.
func (o *BoxliteConfiguration) SetBillingApiUrl(v string) {
o.BillingApiUrl = &v
}
// GetAnalyticsApiUrl returns the AnalyticsApiUrl field value if set, zero value otherwise.
func (o *BoxliteConfiguration) GetAnalyticsApiUrl() string {
if o == nil || IsNil(o.AnalyticsApiUrl) {
var ret string
return ret
}
return *o.AnalyticsApiUrl
}
// GetAnalyticsApiUrlOk returns a tuple with the AnalyticsApiUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BoxliteConfiguration) GetAnalyticsApiUrlOk() (*string, bool) {
if o == nil || IsNil(o.AnalyticsApiUrl) {
return nil, false
}
return o.AnalyticsApiUrl, true
}
// HasAnalyticsApiUrl returns a boolean if a field has been set.
func (o *BoxliteConfiguration) HasAnalyticsApiUrl() bool {
if o != nil && !IsNil(o.AnalyticsApiUrl) {
return true
}
return false
}
// SetAnalyticsApiUrl gets a reference to the given string and assigns it to the AnalyticsApiUrl field.
func (o *BoxliteConfiguration) SetAnalyticsApiUrl(v string) {
o.AnalyticsApiUrl = &v
}
// GetRateLimit returns the RateLimit field value if set, zero value otherwise.
func (o *BoxliteConfiguration) GetRateLimit() RateLimitConfig {
if o == nil || IsNil(o.RateLimit) {
var ret RateLimitConfig
return ret
}
return *o.RateLimit
}
// GetRateLimitOk returns a tuple with the RateLimit field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BoxliteConfiguration) GetRateLimitOk() (*RateLimitConfig, bool) {
if o == nil || IsNil(o.RateLimit) {
return nil, false
}
return o.RateLimit, true
}
// HasRateLimit returns a boolean if a field has been set.
func (o *BoxliteConfiguration) HasRateLimit() bool {
if o != nil && !IsNil(o.RateLimit) {
return true
}
return false
}
// SetRateLimit gets a reference to the given RateLimitConfig and assigns it to the RateLimit field.
func (o *BoxliteConfiguration) SetRateLimit(v RateLimitConfig) {
o.RateLimit = &v
}
func (o BoxliteConfiguration) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o BoxliteConfiguration) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Turnstile) {
toSerialize["turnstile"] = o.Turnstile
}
toSerialize["version"] = o.Version
if !IsNil(o.Posthog) {
toSerialize["posthog"] = o.Posthog
}
toSerialize["oidc"] = o.Oidc
toSerialize["linkedAccountsEnabled"] = o.LinkedAccountsEnabled
toSerialize["announcements"] = o.Announcements
if !IsNil(o.PylonAppId) {
toSerialize["pylonAppId"] = o.PylonAppId
}
toSerialize["proxyTemplateUrl"] = o.ProxyTemplateUrl
toSerialize["dashboardUrl"] = o.DashboardUrl
toSerialize["maintananceMode"] = o.MaintananceMode
toSerialize["environment"] = o.Environment
if !IsNil(o.BillingApiUrl) {
toSerialize["billingApiUrl"] = o.BillingApiUrl
}
if !IsNil(o.AnalyticsApiUrl) {
toSerialize["analyticsApiUrl"] = o.AnalyticsApiUrl
}
if !IsNil(o.RateLimit) {
toSerialize["rateLimit"] = o.RateLimit
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *BoxliteConfiguration) 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{
"version",
"oidc",
"linkedAccountsEnabled",
"announcements",
"proxyTemplateUrl",
"dashboardUrl",
"maintananceMode",
"environment",
}
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)
}
}
varBoxliteConfiguration := _BoxliteConfiguration{}
err = json.Unmarshal(data, &varBoxliteConfiguration)
if err != nil {
return err
}
*o = BoxliteConfiguration(varBoxliteConfiguration)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "turnstile")
delete(additionalProperties, "version")
delete(additionalProperties, "posthog")
delete(additionalProperties, "oidc")
delete(additionalProperties, "linkedAccountsEnabled")
delete(additionalProperties, "announcements")
delete(additionalProperties, "pylonAppId")
delete(additionalProperties, "proxyTemplateUrl")
delete(additionalProperties, "dashboardUrl")
delete(additionalProperties, "maintananceMode")
delete(additionalProperties, "environment")
delete(additionalProperties, "billingApiUrl")
delete(additionalProperties, "analyticsApiUrl")
delete(additionalProperties, "rateLimit")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableBoxliteConfiguration struct {
value *BoxliteConfiguration
isSet bool
}
func (v NullableBoxliteConfiguration) Get() *BoxliteConfiguration {
return v.value
}
func (v *NullableBoxliteConfiguration) Set(val *BoxliteConfiguration) {
v.value = val
v.isSet = true
}
func (v NullableBoxliteConfiguration) IsSet() bool {
return v.isSet
}
func (v *NullableBoxliteConfiguration) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBoxliteConfiguration(val *BoxliteConfiguration) *NullableBoxliteConfiguration {
return &NullableBoxliteConfiguration{value: val, isSet: true}
}
func (v NullableBoxliteConfiguration) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBoxliteConfiguration) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}