Files
sdk/model_agent_reply.go

307 lines
8.4 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 AgentReply type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AgentReply{}
// AgentReply struct for AgentReply
type AgentReply struct {
// Channel is the conversation inside that workspace, and it is what decides whether there is an address at all. Empty is the ordinary case: a caller of /v1/agent/coding holds a session id and reads the stream instead.
Channel *string `json:"channel,omitempty"`
// Provider is the transport the conversation is on — slack, discord, telegram, teams — and it is what decides who can carry the text at all. An address without it names a channel in no particular workspace.
Provider *string `json:"provider,omitempty"`
// Thread narrows the address to one thread inside the channel — on Slack the parent message's ts, the same value a reply carries as thread_ts. Empty puts the text at the top level of the channel.
Thread *string `json:"thread,omitempty"`
// Turn is the turn that renders a run started here: the session whose one message the run's progress and its outcome are shown in. A run with a Turn posts nothing of its own — one question, one message. The dispatcher writes it (apps/agents/replyto.go); a model never does.
Turn *string `json:"turn,omitempty"`
// User is the platform's id for the person the conversation is with — whose run it is. A run's buttons name them to anyone else who presses one; it is never what decides who may (that is the chat identity).
User *string `json:"user,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AgentReply AgentReply
// NewAgentReply instantiates a new AgentReply 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 NewAgentReply() *AgentReply {
this := AgentReply{}
return &this
}
// NewAgentReplyWithDefaults instantiates a new AgentReply 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 NewAgentReplyWithDefaults() *AgentReply {
this := AgentReply{}
return &this
}
// GetChannel returns the Channel field value if set, zero value otherwise.
func (o *AgentReply) GetChannel() string {
if o == nil || IsNil(o.Channel) {
var ret string
return ret
}
return *o.Channel
}
// GetChannelOk returns a tuple with the Channel field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentReply) GetChannelOk() (*string, bool) {
if o == nil || IsNil(o.Channel) {
return nil, false
}
return o.Channel, true
}
// HasChannel returns a boolean if a field has been set.
func (o *AgentReply) HasChannel() bool {
if o != nil && !IsNil(o.Channel) {
return true
}
return false
}
// SetChannel gets a reference to the given string and assigns it to the Channel field.
func (o *AgentReply) SetChannel(v string) {
o.Channel = &v
}
// GetProvider returns the Provider field value if set, zero value otherwise.
func (o *AgentReply) GetProvider() string {
if o == nil || IsNil(o.Provider) {
var ret string
return ret
}
return *o.Provider
}
// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentReply) GetProviderOk() (*string, bool) {
if o == nil || IsNil(o.Provider) {
return nil, false
}
return o.Provider, true
}
// HasProvider returns a boolean if a field has been set.
func (o *AgentReply) HasProvider() bool {
if o != nil && !IsNil(o.Provider) {
return true
}
return false
}
// SetProvider gets a reference to the given string and assigns it to the Provider field.
func (o *AgentReply) SetProvider(v string) {
o.Provider = &v
}
// GetThread returns the Thread field value if set, zero value otherwise.
func (o *AgentReply) GetThread() string {
if o == nil || IsNil(o.Thread) {
var ret string
return ret
}
return *o.Thread
}
// GetThreadOk returns a tuple with the Thread field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentReply) GetThreadOk() (*string, bool) {
if o == nil || IsNil(o.Thread) {
return nil, false
}
return o.Thread, true
}
// HasThread returns a boolean if a field has been set.
func (o *AgentReply) HasThread() bool {
if o != nil && !IsNil(o.Thread) {
return true
}
return false
}
// SetThread gets a reference to the given string and assigns it to the Thread field.
func (o *AgentReply) SetThread(v string) {
o.Thread = &v
}
// GetTurn returns the Turn field value if set, zero value otherwise.
func (o *AgentReply) GetTurn() string {
if o == nil || IsNil(o.Turn) {
var ret string
return ret
}
return *o.Turn
}
// GetTurnOk returns a tuple with the Turn field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentReply) GetTurnOk() (*string, bool) {
if o == nil || IsNil(o.Turn) {
return nil, false
}
return o.Turn, true
}
// HasTurn returns a boolean if a field has been set.
func (o *AgentReply) HasTurn() bool {
if o != nil && !IsNil(o.Turn) {
return true
}
return false
}
// SetTurn gets a reference to the given string and assigns it to the Turn field.
func (o *AgentReply) SetTurn(v string) {
o.Turn = &v
}
// GetUser returns the User field value if set, zero value otherwise.
func (o *AgentReply) GetUser() string {
if o == nil || IsNil(o.User) {
var ret string
return ret
}
return *o.User
}
// GetUserOk returns a tuple with the User field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentReply) GetUserOk() (*string, bool) {
if o == nil || IsNil(o.User) {
return nil, false
}
return o.User, true
}
// HasUser returns a boolean if a field has been set.
func (o *AgentReply) HasUser() bool {
if o != nil && !IsNil(o.User) {
return true
}
return false
}
// SetUser gets a reference to the given string and assigns it to the User field.
func (o *AgentReply) SetUser(v string) {
o.User = &v
}
func (o AgentReply) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AgentReply) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Channel) {
toSerialize["channel"] = o.Channel
}
if !IsNil(o.Provider) {
toSerialize["provider"] = o.Provider
}
if !IsNil(o.Thread) {
toSerialize["thread"] = o.Thread
}
if !IsNil(o.Turn) {
toSerialize["turn"] = o.Turn
}
if !IsNil(o.User) {
toSerialize["user"] = o.User
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AgentReply) UnmarshalJSON(data []byte) (err error) {
varAgentReply := _AgentReply{}
err = json.Unmarshal(data, &varAgentReply)
if err != nil {
return err
}
*o = AgentReply(varAgentReply)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "channel")
delete(additionalProperties, "provider")
delete(additionalProperties, "thread")
delete(additionalProperties, "turn")
delete(additionalProperties, "user")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAgentReply struct {
value *AgentReply
isSet bool
}
func (v NullableAgentReply) Get() *AgentReply {
return v.value
}
func (v *NullableAgentReply) Set(val *AgentReply) {
v.value = val
v.isSet = true
}
func (v NullableAgentReply) IsSet() bool {
return v.isSet
}
func (v *NullableAgentReply) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAgentReply(val *AgentReply) *NullableAgentReply {
return &NullableAgentReply{value: val, isSet: true}
}
func (v NullableAgentReply) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAgentReply) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}