mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
421 lines
11 KiB
Go
421 lines
11 KiB
Go
/*
|
|
Hanzo Cloud API
|
|
|
|
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
|
|
|
API version: v1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package hanzoai
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the GuideActionRecord type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GuideActionRecord{}
|
|
|
|
// GuideActionRecord struct for GuideActionRecord
|
|
type GuideActionRecord struct {
|
|
// Args is the JSON the tool was called with, recorded as TEXT exactly as sent — including whatever the AI drafted into it — so a run can be read back and reproduced. It is a string, not an object.
|
|
Args *string `json:"args,omitempty"`
|
|
// CreatedAt is when the run was recorded, as Unix seconds. The ledger is read newest-first on this column.
|
|
CreatedAt *int64 `json:"createdAt,omitempty"`
|
|
// Err is why the run failed, when it did. Empty on a successful run.
|
|
Err *string `json:"err,omitempty"`
|
|
// ID identifies this one execution. The ledger is append-only, so an id is never reused and never updated.
|
|
Id *string `json:"id,omitempty"`
|
|
// OK is whether the tool ran to completion. It is the ledger's own verdict, not the tool's opinion of the outcome — a tool that succeeded at reporting bad news is ok.
|
|
Ok *bool `json:"ok,omitempty"`
|
|
// Result is the tool's own answer, likewise recorded as JSON text. Present on a failed run too, where the tool answered but the answer was a refusal.
|
|
Result *string `json:"result,omitempty"`
|
|
// StepID is the checklist step the Business AI was acting on.
|
|
StepId *string `json:"stepId,omitempty"`
|
|
// Tool is the MCP tool that was dispatched, by name.
|
|
Tool *string `json:"tool,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GuideActionRecord GuideActionRecord
|
|
|
|
// NewGuideActionRecord instantiates a new GuideActionRecord 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 NewGuideActionRecord() *GuideActionRecord {
|
|
this := GuideActionRecord{}
|
|
return &this
|
|
}
|
|
|
|
// NewGuideActionRecordWithDefaults instantiates a new GuideActionRecord 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 NewGuideActionRecordWithDefaults() *GuideActionRecord {
|
|
this := GuideActionRecord{}
|
|
return &this
|
|
}
|
|
|
|
// GetArgs returns the Args field value if set, zero value otherwise.
|
|
func (o *GuideActionRecord) GetArgs() string {
|
|
if o == nil || IsNil(o.Args) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Args
|
|
}
|
|
|
|
// GetArgsOk returns a tuple with the Args field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideActionRecord) GetArgsOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Args) {
|
|
return nil, false
|
|
}
|
|
return o.Args, true
|
|
}
|
|
|
|
// HasArgs returns a boolean if a field has been set.
|
|
func (o *GuideActionRecord) HasArgs() bool {
|
|
if o != nil && !IsNil(o.Args) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetArgs gets a reference to the given string and assigns it to the Args field.
|
|
func (o *GuideActionRecord) SetArgs(v string) {
|
|
o.Args = &v
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *GuideActionRecord) GetCreatedAt() int64 {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.CreatedAt
|
|
}
|
|
|
|
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideActionRecord) GetCreatedAtOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedAt, true
|
|
}
|
|
|
|
// HasCreatedAt returns a boolean if a field has been set.
|
|
func (o *GuideActionRecord) HasCreatedAt() bool {
|
|
if o != nil && !IsNil(o.CreatedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field.
|
|
func (o *GuideActionRecord) SetCreatedAt(v int64) {
|
|
o.CreatedAt = &v
|
|
}
|
|
|
|
// GetErr returns the Err field value if set, zero value otherwise.
|
|
func (o *GuideActionRecord) GetErr() string {
|
|
if o == nil || IsNil(o.Err) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Err
|
|
}
|
|
|
|
// GetErrOk returns a tuple with the Err field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideActionRecord) GetErrOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Err) {
|
|
return nil, false
|
|
}
|
|
return o.Err, true
|
|
}
|
|
|
|
// HasErr returns a boolean if a field has been set.
|
|
func (o *GuideActionRecord) HasErr() bool {
|
|
if o != nil && !IsNil(o.Err) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetErr gets a reference to the given string and assigns it to the Err field.
|
|
func (o *GuideActionRecord) SetErr(v string) {
|
|
o.Err = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *GuideActionRecord) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideActionRecord) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *GuideActionRecord) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *GuideActionRecord) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetOk returns the Ok field value if set, zero value otherwise.
|
|
func (o *GuideActionRecord) GetOk() bool {
|
|
if o == nil || IsNil(o.Ok) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Ok
|
|
}
|
|
|
|
// GetOkOk returns a tuple with the Ok field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideActionRecord) GetOkOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Ok) {
|
|
return nil, false
|
|
}
|
|
return o.Ok, true
|
|
}
|
|
|
|
// HasOk returns a boolean if a field has been set.
|
|
func (o *GuideActionRecord) HasOk() bool {
|
|
if o != nil && !IsNil(o.Ok) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOk gets a reference to the given bool and assigns it to the Ok field.
|
|
func (o *GuideActionRecord) SetOk(v bool) {
|
|
o.Ok = &v
|
|
}
|
|
|
|
// GetResult returns the Result field value if set, zero value otherwise.
|
|
func (o *GuideActionRecord) GetResult() string {
|
|
if o == nil || IsNil(o.Result) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Result
|
|
}
|
|
|
|
// GetResultOk returns a tuple with the Result field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideActionRecord) GetResultOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Result) {
|
|
return nil, false
|
|
}
|
|
return o.Result, true
|
|
}
|
|
|
|
// HasResult returns a boolean if a field has been set.
|
|
func (o *GuideActionRecord) HasResult() bool {
|
|
if o != nil && !IsNil(o.Result) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetResult gets a reference to the given string and assigns it to the Result field.
|
|
func (o *GuideActionRecord) SetResult(v string) {
|
|
o.Result = &v
|
|
}
|
|
|
|
// GetStepId returns the StepId field value if set, zero value otherwise.
|
|
func (o *GuideActionRecord) GetStepId() string {
|
|
if o == nil || IsNil(o.StepId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.StepId
|
|
}
|
|
|
|
// GetStepIdOk returns a tuple with the StepId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideActionRecord) GetStepIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.StepId) {
|
|
return nil, false
|
|
}
|
|
return o.StepId, true
|
|
}
|
|
|
|
// HasStepId returns a boolean if a field has been set.
|
|
func (o *GuideActionRecord) HasStepId() bool {
|
|
if o != nil && !IsNil(o.StepId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStepId gets a reference to the given string and assigns it to the StepId field.
|
|
func (o *GuideActionRecord) SetStepId(v string) {
|
|
o.StepId = &v
|
|
}
|
|
|
|
// GetTool returns the Tool field value if set, zero value otherwise.
|
|
func (o *GuideActionRecord) GetTool() string {
|
|
if o == nil || IsNil(o.Tool) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Tool
|
|
}
|
|
|
|
// GetToolOk returns a tuple with the Tool field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideActionRecord) GetToolOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Tool) {
|
|
return nil, false
|
|
}
|
|
return o.Tool, true
|
|
}
|
|
|
|
// HasTool returns a boolean if a field has been set.
|
|
func (o *GuideActionRecord) HasTool() bool {
|
|
if o != nil && !IsNil(o.Tool) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTool gets a reference to the given string and assigns it to the Tool field.
|
|
func (o *GuideActionRecord) SetTool(v string) {
|
|
o.Tool = &v
|
|
}
|
|
|
|
func (o GuideActionRecord) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GuideActionRecord) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Args) {
|
|
toSerialize["args"] = o.Args
|
|
}
|
|
if !IsNil(o.CreatedAt) {
|
|
toSerialize["createdAt"] = o.CreatedAt
|
|
}
|
|
if !IsNil(o.Err) {
|
|
toSerialize["err"] = o.Err
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Ok) {
|
|
toSerialize["ok"] = o.Ok
|
|
}
|
|
if !IsNil(o.Result) {
|
|
toSerialize["result"] = o.Result
|
|
}
|
|
if !IsNil(o.StepId) {
|
|
toSerialize["stepId"] = o.StepId
|
|
}
|
|
if !IsNil(o.Tool) {
|
|
toSerialize["tool"] = o.Tool
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GuideActionRecord) UnmarshalJSON(data []byte) (err error) {
|
|
varGuideActionRecord := _GuideActionRecord{}
|
|
|
|
err = json.Unmarshal(data, &varGuideActionRecord)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GuideActionRecord(varGuideActionRecord)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "args")
|
|
delete(additionalProperties, "createdAt")
|
|
delete(additionalProperties, "err")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "ok")
|
|
delete(additionalProperties, "result")
|
|
delete(additionalProperties, "stepId")
|
|
delete(additionalProperties, "tool")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGuideActionRecord struct {
|
|
value *GuideActionRecord
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGuideActionRecord) Get() *GuideActionRecord {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGuideActionRecord) Set(val *GuideActionRecord) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGuideActionRecord) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGuideActionRecord) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGuideActionRecord(val *GuideActionRecord) *NullableGuideActionRecord {
|
|
return &NullableGuideActionRecord{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGuideActionRecord) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGuideActionRecord) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|