mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
8.3 KiB
Go
307 lines
8.3 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 TaskReply type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TaskReply{}
|
|
|
|
// TaskReply struct for TaskReply
|
|
type TaskReply 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 _TaskReply TaskReply
|
|
|
|
// NewTaskReply instantiates a new TaskReply 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 NewTaskReply() *TaskReply {
|
|
this := TaskReply{}
|
|
return &this
|
|
}
|
|
|
|
// NewTaskReplyWithDefaults instantiates a new TaskReply 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 NewTaskReplyWithDefaults() *TaskReply {
|
|
this := TaskReply{}
|
|
return &this
|
|
}
|
|
|
|
// GetChannel returns the Channel field value if set, zero value otherwise.
|
|
func (o *TaskReply) 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 *TaskReply) 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 *TaskReply) 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 *TaskReply) SetChannel(v string) {
|
|
o.Channel = &v
|
|
}
|
|
|
|
// GetProvider returns the Provider field value if set, zero value otherwise.
|
|
func (o *TaskReply) 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 *TaskReply) 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 *TaskReply) 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 *TaskReply) SetProvider(v string) {
|
|
o.Provider = &v
|
|
}
|
|
|
|
// GetThread returns the Thread field value if set, zero value otherwise.
|
|
func (o *TaskReply) 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 *TaskReply) 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 *TaskReply) 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 *TaskReply) SetThread(v string) {
|
|
o.Thread = &v
|
|
}
|
|
|
|
// GetTurn returns the Turn field value if set, zero value otherwise.
|
|
func (o *TaskReply) 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 *TaskReply) 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 *TaskReply) 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 *TaskReply) SetTurn(v string) {
|
|
o.Turn = &v
|
|
}
|
|
|
|
// GetUser returns the User field value if set, zero value otherwise.
|
|
func (o *TaskReply) 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 *TaskReply) 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 *TaskReply) 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 *TaskReply) SetUser(v string) {
|
|
o.User = &v
|
|
}
|
|
|
|
func (o TaskReply) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TaskReply) 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 *TaskReply) UnmarshalJSON(data []byte) (err error) {
|
|
varTaskReply := _TaskReply{}
|
|
|
|
err = json.Unmarshal(data, &varTaskReply)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TaskReply(varTaskReply)
|
|
|
|
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 NullableTaskReply struct {
|
|
value *TaskReply
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTaskReply) Get() *TaskReply {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTaskReply) Set(val *TaskReply) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTaskReply) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTaskReply) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTaskReply(val *TaskReply) *NullableTaskReply {
|
|
return &NullableTaskReply{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTaskReply) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTaskReply) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|