Files
runtime/libs/api-client-go/model_organization.go
zeekay ea80dc3638 feat: Add new Dockerfiles and improve containerization
- Add main Dockerfile for production builds
- Add Dockerfile.runtime for secure code execution
- Add Dockerfile.runtime.fixed with improved configuration
- Include .dockerignore for build optimization
- Add integration documentation and publishing guides
- Update API and CLI components for better runtime support
- Enhance sandbox and container management features
2025-08-16 23:03:39 -05:00

421 lines
9.7 KiB
Go
Generated

/*
Runtime
Runtime 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 (
"bytes"
"encoding/json"
"fmt"
"time"
)
// checks if the Organization type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Organization{}
// Organization struct for Organization
type Organization struct {
// Organization ID
Id string `json:"id"`
// Organization name
Name string `json:"name"`
// User ID of the organization creator
CreatedBy string `json:"createdBy"`
// Personal organization flag
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"`
}
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(id string, name string, createdBy string, personal bool, createdAt time.Time, updatedAt time.Time, suspended bool, suspendedAt time.Time, suspensionReason string, suspendedUntil time.Time) *Organization {
this := Organization{}
this.Id = id
this.Name = name
this.CreatedBy = createdBy
this.Personal = personal
this.CreatedAt = createdAt
this.UpdatedAt = updatedAt
this.Suspended = suspended
this.SuspendedAt = suspendedAt
this.SuspensionReason = suspensionReason
this.SuspendedUntil = suspendedUntil
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
}
// 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
}
// GetPersonal returns the Personal field value
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.
func (o *Organization) GetPersonalOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Personal, true
}
// SetPersonal sets field value
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
}
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["id"] = o.Id
toSerialize["name"] = o.Name
toSerialize["createdBy"] = o.CreatedBy
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
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{
"id",
"name",
"createdBy",
"personal",
"createdAt",
"updatedAt",
"suspended",
"suspendedAt",
"suspensionReason",
"suspendedUntil",
}
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{}
decoder := json.NewDecoder(bytes.NewReader(data))
decoder.DisallowUnknownFields()
err = decoder.Decode(&varOrganization)
if err != nil {
return err
}
*o = Organization(varOrganization)
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)
}