Files
sdk/model_guide_suggestion.go

345 lines
9.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 GuideSuggestion type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GuideSuggestion{}
// GuideSuggestion struct for GuideSuggestion
type GuideSuggestion struct {
// Automatable is true when the step names a tool, so the Business AI can do it rather than only describe it.
Automatable *bool `json:"automatable,omitempty"`
// Detail is the step's own prose — what it asks for.
Detail *string `json:"detail,omitempty"`
// Rationale is why this step is being suggested NOW, written for the person reading it. It explains the ranking, not the step.
Rationale *string `json:"rationale,omitempty"`
// StepID is the checklist step being recommended — the id every step route takes, so a caller can act on the suggestion directly.
StepId *string `json:"stepId,omitempty"`
// Title is the step's own one-line quest.
Title *string `json:"title,omitempty"`
// Unlocks is how many downstream steps completing this one immediately makes available (its leverage) — the primary ranking key.
Unlocks *int64 `json:"unlocks,omitempty"`
AdditionalProperties map[string]interface{}
}
type _GuideSuggestion GuideSuggestion
// NewGuideSuggestion instantiates a new GuideSuggestion 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 NewGuideSuggestion() *GuideSuggestion {
this := GuideSuggestion{}
return &this
}
// NewGuideSuggestionWithDefaults instantiates a new GuideSuggestion 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 NewGuideSuggestionWithDefaults() *GuideSuggestion {
this := GuideSuggestion{}
return &this
}
// GetAutomatable returns the Automatable field value if set, zero value otherwise.
func (o *GuideSuggestion) GetAutomatable() bool {
if o == nil || IsNil(o.Automatable) {
var ret bool
return ret
}
return *o.Automatable
}
// GetAutomatableOk returns a tuple with the Automatable field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GuideSuggestion) GetAutomatableOk() (*bool, bool) {
if o == nil || IsNil(o.Automatable) {
return nil, false
}
return o.Automatable, true
}
// HasAutomatable returns a boolean if a field has been set.
func (o *GuideSuggestion) HasAutomatable() bool {
if o != nil && !IsNil(o.Automatable) {
return true
}
return false
}
// SetAutomatable gets a reference to the given bool and assigns it to the Automatable field.
func (o *GuideSuggestion) SetAutomatable(v bool) {
o.Automatable = &v
}
// GetDetail returns the Detail field value if set, zero value otherwise.
func (o *GuideSuggestion) GetDetail() string {
if o == nil || IsNil(o.Detail) {
var ret string
return ret
}
return *o.Detail
}
// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GuideSuggestion) GetDetailOk() (*string, bool) {
if o == nil || IsNil(o.Detail) {
return nil, false
}
return o.Detail, true
}
// HasDetail returns a boolean if a field has been set.
func (o *GuideSuggestion) HasDetail() bool {
if o != nil && !IsNil(o.Detail) {
return true
}
return false
}
// SetDetail gets a reference to the given string and assigns it to the Detail field.
func (o *GuideSuggestion) SetDetail(v string) {
o.Detail = &v
}
// GetRationale returns the Rationale field value if set, zero value otherwise.
func (o *GuideSuggestion) GetRationale() string {
if o == nil || IsNil(o.Rationale) {
var ret string
return ret
}
return *o.Rationale
}
// GetRationaleOk returns a tuple with the Rationale field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GuideSuggestion) GetRationaleOk() (*string, bool) {
if o == nil || IsNil(o.Rationale) {
return nil, false
}
return o.Rationale, true
}
// HasRationale returns a boolean if a field has been set.
func (o *GuideSuggestion) HasRationale() bool {
if o != nil && !IsNil(o.Rationale) {
return true
}
return false
}
// SetRationale gets a reference to the given string and assigns it to the Rationale field.
func (o *GuideSuggestion) SetRationale(v string) {
o.Rationale = &v
}
// GetStepId returns the StepId field value if set, zero value otherwise.
func (o *GuideSuggestion) 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 *GuideSuggestion) 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 *GuideSuggestion) 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 *GuideSuggestion) SetStepId(v string) {
o.StepId = &v
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *GuideSuggestion) GetTitle() string {
if o == nil || IsNil(o.Title) {
var ret string
return ret
}
return *o.Title
}
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GuideSuggestion) GetTitleOk() (*string, bool) {
if o == nil || IsNil(o.Title) {
return nil, false
}
return o.Title, true
}
// HasTitle returns a boolean if a field has been set.
func (o *GuideSuggestion) HasTitle() bool {
if o != nil && !IsNil(o.Title) {
return true
}
return false
}
// SetTitle gets a reference to the given string and assigns it to the Title field.
func (o *GuideSuggestion) SetTitle(v string) {
o.Title = &v
}
// GetUnlocks returns the Unlocks field value if set, zero value otherwise.
func (o *GuideSuggestion) GetUnlocks() int64 {
if o == nil || IsNil(o.Unlocks) {
var ret int64
return ret
}
return *o.Unlocks
}
// GetUnlocksOk returns a tuple with the Unlocks field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GuideSuggestion) GetUnlocksOk() (*int64, bool) {
if o == nil || IsNil(o.Unlocks) {
return nil, false
}
return o.Unlocks, true
}
// HasUnlocks returns a boolean if a field has been set.
func (o *GuideSuggestion) HasUnlocks() bool {
if o != nil && !IsNil(o.Unlocks) {
return true
}
return false
}
// SetUnlocks gets a reference to the given int64 and assigns it to the Unlocks field.
func (o *GuideSuggestion) SetUnlocks(v int64) {
o.Unlocks = &v
}
func (o GuideSuggestion) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GuideSuggestion) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Automatable) {
toSerialize["automatable"] = o.Automatable
}
if !IsNil(o.Detail) {
toSerialize["detail"] = o.Detail
}
if !IsNil(o.Rationale) {
toSerialize["rationale"] = o.Rationale
}
if !IsNil(o.StepId) {
toSerialize["stepId"] = o.StepId
}
if !IsNil(o.Title) {
toSerialize["title"] = o.Title
}
if !IsNil(o.Unlocks) {
toSerialize["unlocks"] = o.Unlocks
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *GuideSuggestion) UnmarshalJSON(data []byte) (err error) {
varGuideSuggestion := _GuideSuggestion{}
err = json.Unmarshal(data, &varGuideSuggestion)
if err != nil {
return err
}
*o = GuideSuggestion(varGuideSuggestion)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "automatable")
delete(additionalProperties, "detail")
delete(additionalProperties, "rationale")
delete(additionalProperties, "stepId")
delete(additionalProperties, "title")
delete(additionalProperties, "unlocks")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableGuideSuggestion struct {
value *GuideSuggestion
isSet bool
}
func (v NullableGuideSuggestion) Get() *GuideSuggestion {
return v.value
}
func (v *NullableGuideSuggestion) Set(val *GuideSuggestion) {
v.value = val
v.isSet = true
}
func (v NullableGuideSuggestion) IsSet() bool {
return v.isSet
}
func (v *NullableGuideSuggestion) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGuideSuggestion(val *GuideSuggestion) *NullableGuideSuggestion {
return &NullableGuideSuggestion{value: val, isSet: true}
}
func (v NullableGuideSuggestion) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGuideSuggestion) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}