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 PromptHandoffDto type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PromptHandoffDto{}
// PromptHandoffDto struct for PromptHandoffDto
type PromptHandoffDto struct {
RequestId string `json:"requestId"`
Text string `json:"text"`
CreatedAt time.Time `json:"createdAt"`
CopiedAt NullableTime `json:"copiedAt"`
AdditionalProperties map[string]interface{}
}
type _PromptHandoffDto PromptHandoffDto
// NewPromptHandoffDto instantiates a new PromptHandoffDto 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 NewPromptHandoffDto(requestId string, text string, createdAt time.Time, copiedAt NullableTime) *PromptHandoffDto {
this := PromptHandoffDto{}
this.RequestId = requestId
this.Text = text
this.CreatedAt = createdAt
this.CopiedAt = copiedAt
return &this
}
// NewPromptHandoffDtoWithDefaults instantiates a new PromptHandoffDto 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 NewPromptHandoffDtoWithDefaults() *PromptHandoffDto {
this := PromptHandoffDto{}
return &this
}
// GetRequestId returns the RequestId field value
func (o *PromptHandoffDto) GetRequestId() string {
if o == nil {
var ret string
return ret
}
return o.RequestId
}
// GetRequestIdOk returns a tuple with the RequestId field value
// and a boolean to check if the value has been set.
func (o *PromptHandoffDto) GetRequestIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.RequestId, true
}
// SetRequestId sets field value
func (o *PromptHandoffDto) SetRequestId(v string) {
o.RequestId = v
}
// GetText returns the Text field value
func (o *PromptHandoffDto) GetText() string {
if o == nil {
var ret string
return ret
}
return o.Text
}
// GetTextOk returns a tuple with the Text field value
// and a boolean to check if the value has been set.
func (o *PromptHandoffDto) GetTextOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Text, true
}
// SetText sets field value
func (o *PromptHandoffDto) SetText(v string) {
o.Text = v
}
// GetCreatedAt returns the CreatedAt field value
func (o *PromptHandoffDto) 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 *PromptHandoffDto) GetCreatedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.CreatedAt, true
}
// SetCreatedAt sets field value
func (o *PromptHandoffDto) SetCreatedAt(v time.Time) {
o.CreatedAt = v
}
// GetCopiedAt returns the CopiedAt field value
// If the value is explicit nil, the zero value for time.Time will be returned
func (o *PromptHandoffDto) GetCopiedAt() time.Time {
if o == nil || o.CopiedAt.Get() == nil {
var ret time.Time
return ret
}
return *o.CopiedAt.Get()
}
// GetCopiedAtOk returns a tuple with the CopiedAt 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 *PromptHandoffDto) GetCopiedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return o.CopiedAt.Get(), o.CopiedAt.IsSet()
}
// SetCopiedAt sets field value
func (o *PromptHandoffDto) SetCopiedAt(v time.Time) {
o.CopiedAt.Set(&v)
}
func (o PromptHandoffDto) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PromptHandoffDto) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["requestId"] = o.RequestId
toSerialize["text"] = o.Text
toSerialize["createdAt"] = o.CreatedAt
toSerialize["copiedAt"] = o.CopiedAt.Get()
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *PromptHandoffDto) 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{
"requestId",
"text",
"createdAt",
"copiedAt",
}
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)
}
}
varPromptHandoffDto := _PromptHandoffDto{}
err = json.Unmarshal(data, &varPromptHandoffDto)
if err != nil {
return err
}
*o = PromptHandoffDto(varPromptHandoffDto)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "requestId")
delete(additionalProperties, "text")
delete(additionalProperties, "createdAt")
delete(additionalProperties, "copiedAt")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullablePromptHandoffDto struct {
value *PromptHandoffDto
isSet bool
}
func (v NullablePromptHandoffDto) Get() *PromptHandoffDto {
return v.value
}
func (v *NullablePromptHandoffDto) Set(val *PromptHandoffDto) {
v.value = val
v.isSet = true
}
func (v NullablePromptHandoffDto) IsSet() bool {
return v.isSet
}
func (v *NullablePromptHandoffDto) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePromptHandoffDto(val *PromptHandoffDto) *NullablePromptHandoffDto {
return &NullablePromptHandoffDto{value: val, isSet: true}
}
func (v NullablePromptHandoffDto) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePromptHandoffDto) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}