fleet-memory/hindsight-clients/go/model_add_background_request.go
Nicolò Boschi 0727f2d069 Release v0.4.19
- Update version to 0.4.19 in all components
- Regenerate OpenAPI spec and client SDKs
- Python packages: hindsight-api, hindsight-dev, hindsight-all, hindsight-litellm, hindsight-crewai, hindsight-pydantic-ai, hindsight-hermes, hindsight-agno, hindsight-embed
- Python client: hindsight-clients/python
- TypeScript client: hindsight-clients/typescript
- Rust CLI: hindsight-cli
- Control Plane: hindsight-control-plane
- OpenClaw integration: hindsight-integrations/openclaw
- AI SDK integration: hindsight-integrations/ai-sdk
- Chat SDK integration: hindsight-integrations/chat
- Helm chart
- Sync documentation to version-0.4
2026-03-18 14:29:15 +01:00

200 lines
5.4 KiB
Go

/*
Hindsight HTTP API
HTTP API for Hindsight
API version: 0.4.19
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hindsight
import (
"encoding/json"
"bytes"
"fmt"
)
// checks if the AddBackgroundRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AddBackgroundRequest{}
// AddBackgroundRequest Request model for adding/merging background information. Deprecated: use SetMissionRequest instead.
type AddBackgroundRequest struct {
// New background information to add or merge
Content string `json:"content"`
// Deprecated - disposition is no longer auto-inferred from mission
UpdateDisposition *bool `json:"update_disposition,omitempty"`
}
type _AddBackgroundRequest AddBackgroundRequest
// NewAddBackgroundRequest instantiates a new AddBackgroundRequest 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 NewAddBackgroundRequest(content string) *AddBackgroundRequest {
this := AddBackgroundRequest{}
this.Content = content
var updateDisposition bool = true
this.UpdateDisposition = &updateDisposition
return &this
}
// NewAddBackgroundRequestWithDefaults instantiates a new AddBackgroundRequest 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 NewAddBackgroundRequestWithDefaults() *AddBackgroundRequest {
this := AddBackgroundRequest{}
var updateDisposition bool = true
this.UpdateDisposition = &updateDisposition
return &this
}
// GetContent returns the Content field value
func (o *AddBackgroundRequest) GetContent() string {
if o == nil {
var ret string
return ret
}
return o.Content
}
// GetContentOk returns a tuple with the Content field value
// and a boolean to check if the value has been set.
func (o *AddBackgroundRequest) GetContentOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Content, true
}
// SetContent sets field value
func (o *AddBackgroundRequest) SetContent(v string) {
o.Content = v
}
// GetUpdateDisposition returns the UpdateDisposition field value if set, zero value otherwise.
func (o *AddBackgroundRequest) GetUpdateDisposition() bool {
if o == nil || IsNil(o.UpdateDisposition) {
var ret bool
return ret
}
return *o.UpdateDisposition
}
// GetUpdateDispositionOk returns a tuple with the UpdateDisposition field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AddBackgroundRequest) GetUpdateDispositionOk() (*bool, bool) {
if o == nil || IsNil(o.UpdateDisposition) {
return nil, false
}
return o.UpdateDisposition, true
}
// HasUpdateDisposition returns a boolean if a field has been set.
func (o *AddBackgroundRequest) HasUpdateDisposition() bool {
if o != nil && !IsNil(o.UpdateDisposition) {
return true
}
return false
}
// SetUpdateDisposition gets a reference to the given bool and assigns it to the UpdateDisposition field.
func (o *AddBackgroundRequest) SetUpdateDisposition(v bool) {
o.UpdateDisposition = &v
}
func (o AddBackgroundRequest) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AddBackgroundRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["content"] = o.Content
if !IsNil(o.UpdateDisposition) {
toSerialize["update_disposition"] = o.UpdateDisposition
}
return toSerialize, nil
}
func (o *AddBackgroundRequest) 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{
"content",
}
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)
}
}
varAddBackgroundRequest := _AddBackgroundRequest{}
decoder := json.NewDecoder(bytes.NewReader(data))
decoder.DisallowUnknownFields()
err = decoder.Decode(&varAddBackgroundRequest)
if err != nil {
return err
}
*o = AddBackgroundRequest(varAddBackgroundRequest)
return err
}
type NullableAddBackgroundRequest struct {
value *AddBackgroundRequest
isSet bool
}
func (v NullableAddBackgroundRequest) Get() *AddBackgroundRequest {
return v.value
}
func (v *NullableAddBackgroundRequest) Set(val *AddBackgroundRequest) {
v.value = val
v.isSet = true
}
func (v NullableAddBackgroundRequest) IsSet() bool {
return v.isSet
}
func (v *NullableAddBackgroundRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAddBackgroundRequest(val *AddBackgroundRequest) *NullableAddBackgroundRequest {
return &NullableAddBackgroundRequest{value: val, isSet: true}
}
func (v NullableAddBackgroundRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAddBackgroundRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}