Files
sdk/model_workflow.go

413 lines
10 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 Workflow type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Workflow{}
// Workflow struct for Workflow
type Workflow struct {
CreatedTime *string `json:"createdTime,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
Message *string `json:"message,omitempty"`
Name *string `json:"name,omitempty"`
Owner *string `json:"owner,omitempty"`
QuestionTemplate *string `json:"questionTemplate,omitempty"`
Text *string `json:"text,omitempty"`
Text2 *string `json:"text2,omitempty"`
AdditionalProperties map[string]interface{}
}
type _Workflow Workflow
// NewWorkflow instantiates a new Workflow 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 NewWorkflow() *Workflow {
this := Workflow{}
return &this
}
// NewWorkflowWithDefaults instantiates a new Workflow 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 NewWorkflowWithDefaults() *Workflow {
this := Workflow{}
return &this
}
// GetCreatedTime returns the CreatedTime field value if set, zero value otherwise.
func (o *Workflow) GetCreatedTime() string {
if o == nil || IsNil(o.CreatedTime) {
var ret string
return ret
}
return *o.CreatedTime
}
// GetCreatedTimeOk returns a tuple with the CreatedTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Workflow) GetCreatedTimeOk() (*string, bool) {
if o == nil || IsNil(o.CreatedTime) {
return nil, false
}
return o.CreatedTime, true
}
// HasCreatedTime returns a boolean if a field has been set.
func (o *Workflow) HasCreatedTime() bool {
if o != nil && !IsNil(o.CreatedTime) {
return true
}
return false
}
// SetCreatedTime gets a reference to the given string and assigns it to the CreatedTime field.
func (o *Workflow) SetCreatedTime(v string) {
o.CreatedTime = &v
}
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
func (o *Workflow) GetDisplayName() string {
if o == nil || IsNil(o.DisplayName) {
var ret string
return ret
}
return *o.DisplayName
}
// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Workflow) GetDisplayNameOk() (*string, bool) {
if o == nil || IsNil(o.DisplayName) {
return nil, false
}
return o.DisplayName, true
}
// HasDisplayName returns a boolean if a field has been set.
func (o *Workflow) HasDisplayName() bool {
if o != nil && !IsNil(o.DisplayName) {
return true
}
return false
}
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
func (o *Workflow) SetDisplayName(v string) {
o.DisplayName = &v
}
// GetMessage returns the Message field value if set, zero value otherwise.
func (o *Workflow) GetMessage() string {
if o == nil || IsNil(o.Message) {
var ret string
return ret
}
return *o.Message
}
// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Workflow) GetMessageOk() (*string, bool) {
if o == nil || IsNil(o.Message) {
return nil, false
}
return o.Message, true
}
// HasMessage returns a boolean if a field has been set.
func (o *Workflow) HasMessage() bool {
if o != nil && !IsNil(o.Message) {
return true
}
return false
}
// SetMessage gets a reference to the given string and assigns it to the Message field.
func (o *Workflow) SetMessage(v string) {
o.Message = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *Workflow) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Workflow) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *Workflow) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *Workflow) SetName(v string) {
o.Name = &v
}
// GetOwner returns the Owner field value if set, zero value otherwise.
func (o *Workflow) GetOwner() string {
if o == nil || IsNil(o.Owner) {
var ret string
return ret
}
return *o.Owner
}
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Workflow) GetOwnerOk() (*string, bool) {
if o == nil || IsNil(o.Owner) {
return nil, false
}
return o.Owner, true
}
// HasOwner returns a boolean if a field has been set.
func (o *Workflow) HasOwner() bool {
if o != nil && !IsNil(o.Owner) {
return true
}
return false
}
// SetOwner gets a reference to the given string and assigns it to the Owner field.
func (o *Workflow) SetOwner(v string) {
o.Owner = &v
}
// GetQuestionTemplate returns the QuestionTemplate field value if set, zero value otherwise.
func (o *Workflow) GetQuestionTemplate() string {
if o == nil || IsNil(o.QuestionTemplate) {
var ret string
return ret
}
return *o.QuestionTemplate
}
// GetQuestionTemplateOk returns a tuple with the QuestionTemplate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Workflow) GetQuestionTemplateOk() (*string, bool) {
if o == nil || IsNil(o.QuestionTemplate) {
return nil, false
}
return o.QuestionTemplate, true
}
// HasQuestionTemplate returns a boolean if a field has been set.
func (o *Workflow) HasQuestionTemplate() bool {
if o != nil && !IsNil(o.QuestionTemplate) {
return true
}
return false
}
// SetQuestionTemplate gets a reference to the given string and assigns it to the QuestionTemplate field.
func (o *Workflow) SetQuestionTemplate(v string) {
o.QuestionTemplate = &v
}
// GetText returns the Text field value if set, zero value otherwise.
func (o *Workflow) GetText() string {
if o == nil || IsNil(o.Text) {
var ret string
return ret
}
return *o.Text
}
// GetTextOk returns a tuple with the Text field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Workflow) GetTextOk() (*string, bool) {
if o == nil || IsNil(o.Text) {
return nil, false
}
return o.Text, true
}
// HasText returns a boolean if a field has been set.
func (o *Workflow) HasText() bool {
if o != nil && !IsNil(o.Text) {
return true
}
return false
}
// SetText gets a reference to the given string and assigns it to the Text field.
func (o *Workflow) SetText(v string) {
o.Text = &v
}
// GetText2 returns the Text2 field value if set, zero value otherwise.
func (o *Workflow) GetText2() string {
if o == nil || IsNil(o.Text2) {
var ret string
return ret
}
return *o.Text2
}
// GetText2Ok returns a tuple with the Text2 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Workflow) GetText2Ok() (*string, bool) {
if o == nil || IsNil(o.Text2) {
return nil, false
}
return o.Text2, true
}
// HasText2 returns a boolean if a field has been set.
func (o *Workflow) HasText2() bool {
if o != nil && !IsNil(o.Text2) {
return true
}
return false
}
// SetText2 gets a reference to the given string and assigns it to the Text2 field.
func (o *Workflow) SetText2(v string) {
o.Text2 = &v
}
func (o Workflow) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Workflow) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.CreatedTime) {
toSerialize["createdTime"] = o.CreatedTime
}
if !IsNil(o.DisplayName) {
toSerialize["displayName"] = o.DisplayName
}
if !IsNil(o.Message) {
toSerialize["message"] = o.Message
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Owner) {
toSerialize["owner"] = o.Owner
}
if !IsNil(o.QuestionTemplate) {
toSerialize["questionTemplate"] = o.QuestionTemplate
}
if !IsNil(o.Text) {
toSerialize["text"] = o.Text
}
if !IsNil(o.Text2) {
toSerialize["text2"] = o.Text2
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *Workflow) UnmarshalJSON(data []byte) (err error) {
varWorkflow := _Workflow{}
err = json.Unmarshal(data, &varWorkflow)
if err != nil {
return err
}
*o = Workflow(varWorkflow)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "createdTime")
delete(additionalProperties, "displayName")
delete(additionalProperties, "message")
delete(additionalProperties, "name")
delete(additionalProperties, "owner")
delete(additionalProperties, "questionTemplate")
delete(additionalProperties, "text")
delete(additionalProperties, "text2")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableWorkflow struct {
value *Workflow
isSet bool
}
func (v NullableWorkflow) Get() *Workflow {
return v.value
}
func (v *NullableWorkflow) Set(val *Workflow) {
v.value = val
v.isSet = true
}
func (v NullableWorkflow) IsSet() bool {
return v.isSet
}
func (v *NullableWorkflow) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableWorkflow(val *Workflow) *NullableWorkflow {
return &NullableWorkflow{value: val, isSet: true}
}
func (v NullableWorkflow) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableWorkflow) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}