fleet-memory/hindsight-clients/go/model_reflect_request.go
Nicolò Boschi 27cb7e43e0 Release v0.5.0
- Update version to 0.5.0 in all components
- Regenerate OpenAPI spec and client SDKs
- Python packages: hindsight-api, hindsight-dev, hindsight-all, hindsight-embed
- Python client: hindsight-clients/python
- TypeScript client: hindsight-clients/typescript
- Rust CLI: hindsight-cli
- Control Plane: hindsight-control-plane
- Helm chart
- Create documentation version-0.5
2026-04-08 17:56:47 +02:00

585 lines
16 KiB
Go

/*
Hindsight HTTP API
HTTP API for Hindsight
API version: 0.5.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hindsight
import (
"encoding/json"
"bytes"
"fmt"
)
// checks if the ReflectRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ReflectRequest{}
// ReflectRequest Request model for reflect endpoint.
type ReflectRequest struct {
Query string `json:"query"`
Budget *Budget `json:"budget,omitempty"`
Context NullableString `json:"context,omitempty"`
// Maximum tokens for the response
MaxTokens *int32 `json:"max_tokens,omitempty"`
// Options for including additional data (disabled by default)
Include *ReflectIncludeOptions `json:"include,omitempty"`
ResponseSchema map[string]interface{} `json:"response_schema,omitempty"`
Tags []string `json:"tags,omitempty"`
// How to match tags: 'any' (OR, includes untagged), 'all' (AND, includes untagged), 'any_strict' (OR, excludes untagged), 'all_strict' (AND, excludes untagged).
TagsMatch *string `json:"tags_match,omitempty"`
TagGroups []MentalModelTriggerInputTagGroupsInner `json:"tag_groups,omitempty"`
FactTypes []string `json:"fact_types,omitempty"`
// If true, exclude all mental models from the reflect loop (skip search_mental_models tool).
ExcludeMentalModels *bool `json:"exclude_mental_models,omitempty"`
ExcludeMentalModelIds []string `json:"exclude_mental_model_ids,omitempty"`
}
type _ReflectRequest ReflectRequest
// NewReflectRequest instantiates a new ReflectRequest 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 NewReflectRequest(query string) *ReflectRequest {
this := ReflectRequest{}
this.Query = query
var maxTokens int32 = 4096
this.MaxTokens = &maxTokens
var tagsMatch string = "any"
this.TagsMatch = &tagsMatch
var excludeMentalModels bool = false
this.ExcludeMentalModels = &excludeMentalModels
return &this
}
// NewReflectRequestWithDefaults instantiates a new ReflectRequest 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 NewReflectRequestWithDefaults() *ReflectRequest {
this := ReflectRequest{}
var maxTokens int32 = 4096
this.MaxTokens = &maxTokens
var tagsMatch string = "any"
this.TagsMatch = &tagsMatch
var excludeMentalModels bool = false
this.ExcludeMentalModels = &excludeMentalModels
return &this
}
// GetQuery returns the Query field value
func (o *ReflectRequest) GetQuery() string {
if o == nil {
var ret string
return ret
}
return o.Query
}
// GetQueryOk returns a tuple with the Query field value
// and a boolean to check if the value has been set.
func (o *ReflectRequest) GetQueryOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Query, true
}
// SetQuery sets field value
func (o *ReflectRequest) SetQuery(v string) {
o.Query = v
}
// GetBudget returns the Budget field value if set, zero value otherwise.
func (o *ReflectRequest) GetBudget() Budget {
if o == nil || IsNil(o.Budget) {
var ret Budget
return ret
}
return *o.Budget
}
// GetBudgetOk returns a tuple with the Budget field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ReflectRequest) GetBudgetOk() (*Budget, bool) {
if o == nil || IsNil(o.Budget) {
return nil, false
}
return o.Budget, true
}
// HasBudget returns a boolean if a field has been set.
func (o *ReflectRequest) HasBudget() bool {
if o != nil && !IsNil(o.Budget) {
return true
}
return false
}
// SetBudget gets a reference to the given Budget and assigns it to the Budget field.
func (o *ReflectRequest) SetBudget(v Budget) {
o.Budget = &v
}
// GetContext returns the Context field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ReflectRequest) GetContext() string {
if o == nil || IsNil(o.Context.Get()) {
var ret string
return ret
}
return *o.Context.Get()
}
// GetContextOk returns a tuple with the Context 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 *ReflectRequest) GetContextOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Context.Get(), o.Context.IsSet()
}
// HasContext returns a boolean if a field has been set.
func (o *ReflectRequest) HasContext() bool {
if o != nil && o.Context.IsSet() {
return true
}
return false
}
// SetContext gets a reference to the given NullableString and assigns it to the Context field.
func (o *ReflectRequest) SetContext(v string) {
o.Context.Set(&v)
}
// SetContextNil sets the value for Context to be an explicit nil
func (o *ReflectRequest) SetContextNil() {
o.Context.Set(nil)
}
// UnsetContext ensures that no value is present for Context, not even an explicit nil
func (o *ReflectRequest) UnsetContext() {
o.Context.Unset()
}
// GetMaxTokens returns the MaxTokens field value if set, zero value otherwise.
func (o *ReflectRequest) GetMaxTokens() int32 {
if o == nil || IsNil(o.MaxTokens) {
var ret int32
return ret
}
return *o.MaxTokens
}
// GetMaxTokensOk returns a tuple with the MaxTokens field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ReflectRequest) GetMaxTokensOk() (*int32, bool) {
if o == nil || IsNil(o.MaxTokens) {
return nil, false
}
return o.MaxTokens, true
}
// HasMaxTokens returns a boolean if a field has been set.
func (o *ReflectRequest) HasMaxTokens() bool {
if o != nil && !IsNil(o.MaxTokens) {
return true
}
return false
}
// SetMaxTokens gets a reference to the given int32 and assigns it to the MaxTokens field.
func (o *ReflectRequest) SetMaxTokens(v int32) {
o.MaxTokens = &v
}
// GetInclude returns the Include field value if set, zero value otherwise.
func (o *ReflectRequest) GetInclude() ReflectIncludeOptions {
if o == nil || IsNil(o.Include) {
var ret ReflectIncludeOptions
return ret
}
return *o.Include
}
// GetIncludeOk returns a tuple with the Include field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ReflectRequest) GetIncludeOk() (*ReflectIncludeOptions, bool) {
if o == nil || IsNil(o.Include) {
return nil, false
}
return o.Include, true
}
// HasInclude returns a boolean if a field has been set.
func (o *ReflectRequest) HasInclude() bool {
if o != nil && !IsNil(o.Include) {
return true
}
return false
}
// SetInclude gets a reference to the given ReflectIncludeOptions and assigns it to the Include field.
func (o *ReflectRequest) SetInclude(v ReflectIncludeOptions) {
o.Include = &v
}
// GetResponseSchema returns the ResponseSchema field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ReflectRequest) GetResponseSchema() map[string]interface{} {
if o == nil {
var ret map[string]interface{}
return ret
}
return o.ResponseSchema
}
// GetResponseSchemaOk returns a tuple with the ResponseSchema 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 *ReflectRequest) GetResponseSchemaOk() (map[string]interface{}, bool) {
if o == nil || IsNil(o.ResponseSchema) {
return map[string]interface{}{}, false
}
return o.ResponseSchema, true
}
// HasResponseSchema returns a boolean if a field has been set.
func (o *ReflectRequest) HasResponseSchema() bool {
if o != nil && !IsNil(o.ResponseSchema) {
return true
}
return false
}
// SetResponseSchema gets a reference to the given map[string]interface{} and assigns it to the ResponseSchema field.
func (o *ReflectRequest) SetResponseSchema(v map[string]interface{}) {
o.ResponseSchema = v
}
// GetTags returns the Tags field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ReflectRequest) GetTags() []string {
if o == nil {
var ret []string
return ret
}
return o.Tags
}
// GetTagsOk returns a tuple with the Tags 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 *ReflectRequest) GetTagsOk() ([]string, bool) {
if o == nil || IsNil(o.Tags) {
return nil, false
}
return o.Tags, true
}
// HasTags returns a boolean if a field has been set.
func (o *ReflectRequest) HasTags() bool {
if o != nil && !IsNil(o.Tags) {
return true
}
return false
}
// SetTags gets a reference to the given []string and assigns it to the Tags field.
func (o *ReflectRequest) SetTags(v []string) {
o.Tags = v
}
// GetTagsMatch returns the TagsMatch field value if set, zero value otherwise.
func (o *ReflectRequest) GetTagsMatch() string {
if o == nil || IsNil(o.TagsMatch) {
var ret string
return ret
}
return *o.TagsMatch
}
// GetTagsMatchOk returns a tuple with the TagsMatch field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ReflectRequest) GetTagsMatchOk() (*string, bool) {
if o == nil || IsNil(o.TagsMatch) {
return nil, false
}
return o.TagsMatch, true
}
// HasTagsMatch returns a boolean if a field has been set.
func (o *ReflectRequest) HasTagsMatch() bool {
if o != nil && !IsNil(o.TagsMatch) {
return true
}
return false
}
// SetTagsMatch gets a reference to the given string and assigns it to the TagsMatch field.
func (o *ReflectRequest) SetTagsMatch(v string) {
o.TagsMatch = &v
}
// GetTagGroups returns the TagGroups field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ReflectRequest) GetTagGroups() []MentalModelTriggerInputTagGroupsInner {
if o == nil {
var ret []MentalModelTriggerInputTagGroupsInner
return ret
}
return o.TagGroups
}
// GetTagGroupsOk returns a tuple with the TagGroups 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 *ReflectRequest) GetTagGroupsOk() ([]MentalModelTriggerInputTagGroupsInner, bool) {
if o == nil || IsNil(o.TagGroups) {
return nil, false
}
return o.TagGroups, true
}
// HasTagGroups returns a boolean if a field has been set.
func (o *ReflectRequest) HasTagGroups() bool {
if o != nil && !IsNil(o.TagGroups) {
return true
}
return false
}
// SetTagGroups gets a reference to the given []MentalModelTriggerInputTagGroupsInner and assigns it to the TagGroups field.
func (o *ReflectRequest) SetTagGroups(v []MentalModelTriggerInputTagGroupsInner) {
o.TagGroups = v
}
// GetFactTypes returns the FactTypes field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ReflectRequest) GetFactTypes() []string {
if o == nil {
var ret []string
return ret
}
return o.FactTypes
}
// GetFactTypesOk returns a tuple with the FactTypes 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 *ReflectRequest) GetFactTypesOk() ([]string, bool) {
if o == nil || IsNil(o.FactTypes) {
return nil, false
}
return o.FactTypes, true
}
// HasFactTypes returns a boolean if a field has been set.
func (o *ReflectRequest) HasFactTypes() bool {
if o != nil && !IsNil(o.FactTypes) {
return true
}
return false
}
// SetFactTypes gets a reference to the given []string and assigns it to the FactTypes field.
func (o *ReflectRequest) SetFactTypes(v []string) {
o.FactTypes = v
}
// GetExcludeMentalModels returns the ExcludeMentalModels field value if set, zero value otherwise.
func (o *ReflectRequest) GetExcludeMentalModels() bool {
if o == nil || IsNil(o.ExcludeMentalModels) {
var ret bool
return ret
}
return *o.ExcludeMentalModels
}
// GetExcludeMentalModelsOk returns a tuple with the ExcludeMentalModels field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ReflectRequest) GetExcludeMentalModelsOk() (*bool, bool) {
if o == nil || IsNil(o.ExcludeMentalModels) {
return nil, false
}
return o.ExcludeMentalModels, true
}
// HasExcludeMentalModels returns a boolean if a field has been set.
func (o *ReflectRequest) HasExcludeMentalModels() bool {
if o != nil && !IsNil(o.ExcludeMentalModels) {
return true
}
return false
}
// SetExcludeMentalModels gets a reference to the given bool and assigns it to the ExcludeMentalModels field.
func (o *ReflectRequest) SetExcludeMentalModels(v bool) {
o.ExcludeMentalModels = &v
}
// GetExcludeMentalModelIds returns the ExcludeMentalModelIds field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ReflectRequest) GetExcludeMentalModelIds() []string {
if o == nil {
var ret []string
return ret
}
return o.ExcludeMentalModelIds
}
// GetExcludeMentalModelIdsOk returns a tuple with the ExcludeMentalModelIds 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 *ReflectRequest) GetExcludeMentalModelIdsOk() ([]string, bool) {
if o == nil || IsNil(o.ExcludeMentalModelIds) {
return nil, false
}
return o.ExcludeMentalModelIds, true
}
// HasExcludeMentalModelIds returns a boolean if a field has been set.
func (o *ReflectRequest) HasExcludeMentalModelIds() bool {
if o != nil && !IsNil(o.ExcludeMentalModelIds) {
return true
}
return false
}
// SetExcludeMentalModelIds gets a reference to the given []string and assigns it to the ExcludeMentalModelIds field.
func (o *ReflectRequest) SetExcludeMentalModelIds(v []string) {
o.ExcludeMentalModelIds = v
}
func (o ReflectRequest) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ReflectRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["query"] = o.Query
if !IsNil(o.Budget) {
toSerialize["budget"] = o.Budget
}
if o.Context.IsSet() {
toSerialize["context"] = o.Context.Get()
}
if !IsNil(o.MaxTokens) {
toSerialize["max_tokens"] = o.MaxTokens
}
if !IsNil(o.Include) {
toSerialize["include"] = o.Include
}
if o.ResponseSchema != nil {
toSerialize["response_schema"] = o.ResponseSchema
}
if o.Tags != nil {
toSerialize["tags"] = o.Tags
}
if !IsNil(o.TagsMatch) {
toSerialize["tags_match"] = o.TagsMatch
}
if o.TagGroups != nil {
toSerialize["tag_groups"] = o.TagGroups
}
if o.FactTypes != nil {
toSerialize["fact_types"] = o.FactTypes
}
if !IsNil(o.ExcludeMentalModels) {
toSerialize["exclude_mental_models"] = o.ExcludeMentalModels
}
if o.ExcludeMentalModelIds != nil {
toSerialize["exclude_mental_model_ids"] = o.ExcludeMentalModelIds
}
return toSerialize, nil
}
func (o *ReflectRequest) 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{
"query",
}
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)
}
}
varReflectRequest := _ReflectRequest{}
decoder := json.NewDecoder(bytes.NewReader(data))
decoder.DisallowUnknownFields()
err = decoder.Decode(&varReflectRequest)
if err != nil {
return err
}
*o = ReflectRequest(varReflectRequest)
return err
}
type NullableReflectRequest struct {
value *ReflectRequest
isSet bool
}
func (v NullableReflectRequest) Get() *ReflectRequest {
return v.value
}
func (v *NullableReflectRequest) Set(val *ReflectRequest) {
v.value = val
v.isSet = true
}
func (v NullableReflectRequest) IsSet() bool {
return v.isSet
}
func (v *NullableReflectRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableReflectRequest(val *ReflectRequest) *NullableReflectRequest {
return &NullableReflectRequest{value: val, isSet: true}
}
func (v NullableReflectRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableReflectRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}