mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
6.8 KiB
Go
269 lines
6.8 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 FlowFlowRun type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FlowFlowRun{}
|
|
|
|
// FlowFlowRun struct for FlowFlowRun
|
|
type FlowFlowRun struct {
|
|
// Input is the run's chat input value, handed to the graph's input node.
|
|
Input *string `json:"input,omitempty"`
|
|
// Session groups runs into one conversation; the product mints one when absent and returns it in the response.
|
|
Session *string `json:"session,omitempty"`
|
|
Tweaks interface{} `json:"tweaks,omitempty"`
|
|
// Workflow is the UUID of the workflow to run.
|
|
Workflow *string `json:"workflow,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FlowFlowRun FlowFlowRun
|
|
|
|
// NewFlowFlowRun instantiates a new FlowFlowRun 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 NewFlowFlowRun() *FlowFlowRun {
|
|
this := FlowFlowRun{}
|
|
return &this
|
|
}
|
|
|
|
// NewFlowFlowRunWithDefaults instantiates a new FlowFlowRun 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 NewFlowFlowRunWithDefaults() *FlowFlowRun {
|
|
this := FlowFlowRun{}
|
|
return &this
|
|
}
|
|
|
|
// GetInput returns the Input field value if set, zero value otherwise.
|
|
func (o *FlowFlowRun) GetInput() string {
|
|
if o == nil || IsNil(o.Input) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Input
|
|
}
|
|
|
|
// GetInputOk returns a tuple with the Input field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FlowFlowRun) GetInputOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Input) {
|
|
return nil, false
|
|
}
|
|
return o.Input, true
|
|
}
|
|
|
|
// HasInput returns a boolean if a field has been set.
|
|
func (o *FlowFlowRun) HasInput() bool {
|
|
if o != nil && !IsNil(o.Input) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetInput gets a reference to the given string and assigns it to the Input field.
|
|
func (o *FlowFlowRun) SetInput(v string) {
|
|
o.Input = &v
|
|
}
|
|
|
|
// GetSession returns the Session field value if set, zero value otherwise.
|
|
func (o *FlowFlowRun) GetSession() string {
|
|
if o == nil || IsNil(o.Session) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Session
|
|
}
|
|
|
|
// GetSessionOk returns a tuple with the Session field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FlowFlowRun) GetSessionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Session) {
|
|
return nil, false
|
|
}
|
|
return o.Session, true
|
|
}
|
|
|
|
// HasSession returns a boolean if a field has been set.
|
|
func (o *FlowFlowRun) HasSession() bool {
|
|
if o != nil && !IsNil(o.Session) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSession gets a reference to the given string and assigns it to the Session field.
|
|
func (o *FlowFlowRun) SetSession(v string) {
|
|
o.Session = &v
|
|
}
|
|
|
|
// GetTweaks returns the Tweaks field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *FlowFlowRun) GetTweaks() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.Tweaks
|
|
}
|
|
|
|
// GetTweaksOk returns a tuple with the Tweaks 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 *FlowFlowRun) GetTweaksOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.Tweaks) {
|
|
return nil, false
|
|
}
|
|
return &o.Tweaks, true
|
|
}
|
|
|
|
// HasTweaks returns a boolean if a field has been set.
|
|
func (o *FlowFlowRun) HasTweaks() bool {
|
|
if o != nil && !IsNil(o.Tweaks) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTweaks gets a reference to the given interface{} and assigns it to the Tweaks field.
|
|
func (o *FlowFlowRun) SetTweaks(v interface{}) {
|
|
o.Tweaks = v
|
|
}
|
|
|
|
// GetWorkflow returns the Workflow field value if set, zero value otherwise.
|
|
func (o *FlowFlowRun) GetWorkflow() string {
|
|
if o == nil || IsNil(o.Workflow) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Workflow
|
|
}
|
|
|
|
// GetWorkflowOk returns a tuple with the Workflow field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FlowFlowRun) GetWorkflowOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Workflow) {
|
|
return nil, false
|
|
}
|
|
return o.Workflow, true
|
|
}
|
|
|
|
// HasWorkflow returns a boolean if a field has been set.
|
|
func (o *FlowFlowRun) HasWorkflow() bool {
|
|
if o != nil && !IsNil(o.Workflow) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWorkflow gets a reference to the given string and assigns it to the Workflow field.
|
|
func (o *FlowFlowRun) SetWorkflow(v string) {
|
|
o.Workflow = &v
|
|
}
|
|
|
|
func (o FlowFlowRun) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FlowFlowRun) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Input) {
|
|
toSerialize["input"] = o.Input
|
|
}
|
|
if !IsNil(o.Session) {
|
|
toSerialize["session"] = o.Session
|
|
}
|
|
if o.Tweaks != nil {
|
|
toSerialize["tweaks"] = o.Tweaks
|
|
}
|
|
if !IsNil(o.Workflow) {
|
|
toSerialize["workflow"] = o.Workflow
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FlowFlowRun) UnmarshalJSON(data []byte) (err error) {
|
|
varFlowFlowRun := _FlowFlowRun{}
|
|
|
|
err = json.Unmarshal(data, &varFlowFlowRun)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FlowFlowRun(varFlowFlowRun)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "input")
|
|
delete(additionalProperties, "session")
|
|
delete(additionalProperties, "tweaks")
|
|
delete(additionalProperties, "workflow")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFlowFlowRun struct {
|
|
value *FlowFlowRun
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFlowFlowRun) Get() *FlowFlowRun {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFlowFlowRun) Set(val *FlowFlowRun) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFlowFlowRun) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFlowFlowRun) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFlowFlowRun(val *FlowFlowRun) *NullableFlowFlowRun {
|
|
return &NullableFlowFlowRun{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFlowFlowRun) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFlowFlowRun) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|