mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
8.2 KiB
Go
307 lines
8.2 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 GuideStrategyView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GuideStrategyView{}
|
|
|
|
// GuideStrategyView struct for GuideStrategyView
|
|
type GuideStrategyView struct {
|
|
// Action is the tactic itself: the thing to go and do.
|
|
Action *string `json:"action,omitempty"`
|
|
// Category is the growth discipline the tactic belongs to — the axis `?category=` narrows on.
|
|
Category *string `json:"category,omitempty"`
|
|
// ID is the tactic's stable slug in the corpus.
|
|
Id *string `json:"id,omitempty"`
|
|
// Tags are the PRECONDITIONS this tactic already satisfied to appear in the answer — `stage:<name>` and `has:<capability>` predicates over the org's observed profile. They are carried back so a caller can show why a tactic surfaced, not so it can filter again.
|
|
Tags []string `json:"tags,omitempty"`
|
|
// Workload is how much effort running the tactic costs, so a corpus can be cut to what the org has the hands for.
|
|
Workload *string `json:"workload,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GuideStrategyView GuideStrategyView
|
|
|
|
// NewGuideStrategyView instantiates a new GuideStrategyView 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 NewGuideStrategyView() *GuideStrategyView {
|
|
this := GuideStrategyView{}
|
|
return &this
|
|
}
|
|
|
|
// NewGuideStrategyViewWithDefaults instantiates a new GuideStrategyView 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 NewGuideStrategyViewWithDefaults() *GuideStrategyView {
|
|
this := GuideStrategyView{}
|
|
return &this
|
|
}
|
|
|
|
// GetAction returns the Action field value if set, zero value otherwise.
|
|
func (o *GuideStrategyView) GetAction() string {
|
|
if o == nil || IsNil(o.Action) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Action
|
|
}
|
|
|
|
// GetActionOk returns a tuple with the Action field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideStrategyView) GetActionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Action) {
|
|
return nil, false
|
|
}
|
|
return o.Action, true
|
|
}
|
|
|
|
// HasAction returns a boolean if a field has been set.
|
|
func (o *GuideStrategyView) HasAction() bool {
|
|
if o != nil && !IsNil(o.Action) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAction gets a reference to the given string and assigns it to the Action field.
|
|
func (o *GuideStrategyView) SetAction(v string) {
|
|
o.Action = &v
|
|
}
|
|
|
|
// GetCategory returns the Category field value if set, zero value otherwise.
|
|
func (o *GuideStrategyView) GetCategory() string {
|
|
if o == nil || IsNil(o.Category) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Category
|
|
}
|
|
|
|
// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideStrategyView) GetCategoryOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Category) {
|
|
return nil, false
|
|
}
|
|
return o.Category, true
|
|
}
|
|
|
|
// HasCategory returns a boolean if a field has been set.
|
|
func (o *GuideStrategyView) HasCategory() bool {
|
|
if o != nil && !IsNil(o.Category) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCategory gets a reference to the given string and assigns it to the Category field.
|
|
func (o *GuideStrategyView) SetCategory(v string) {
|
|
o.Category = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *GuideStrategyView) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideStrategyView) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *GuideStrategyView) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *GuideStrategyView) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetTags returns the Tags field value if set, zero value otherwise.
|
|
func (o *GuideStrategyView) GetTags() []string {
|
|
if o == nil || IsNil(o.Tags) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Tags
|
|
}
|
|
|
|
// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideStrategyView) GetTagsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Tags) {
|
|
return nil, false
|
|
}
|
|
return o.Tags, true
|
|
}
|
|
|
|
// HasTags returns a boolean if a field has been set.
|
|
func (o *GuideStrategyView) HasTags() bool {
|
|
if o != nil && !IsNil(o.Tags) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTags gets a reference to the given []string and assigns it to the Tags field.
|
|
func (o *GuideStrategyView) SetTags(v []string) {
|
|
o.Tags = v
|
|
}
|
|
|
|
// GetWorkload returns the Workload field value if set, zero value otherwise.
|
|
func (o *GuideStrategyView) GetWorkload() string {
|
|
if o == nil || IsNil(o.Workload) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Workload
|
|
}
|
|
|
|
// GetWorkloadOk returns a tuple with the Workload field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideStrategyView) GetWorkloadOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Workload) {
|
|
return nil, false
|
|
}
|
|
return o.Workload, true
|
|
}
|
|
|
|
// HasWorkload returns a boolean if a field has been set.
|
|
func (o *GuideStrategyView) HasWorkload() bool {
|
|
if o != nil && !IsNil(o.Workload) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWorkload gets a reference to the given string and assigns it to the Workload field.
|
|
func (o *GuideStrategyView) SetWorkload(v string) {
|
|
o.Workload = &v
|
|
}
|
|
|
|
func (o GuideStrategyView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GuideStrategyView) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Action) {
|
|
toSerialize["action"] = o.Action
|
|
}
|
|
if !IsNil(o.Category) {
|
|
toSerialize["category"] = o.Category
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Tags) {
|
|
toSerialize["tags"] = o.Tags
|
|
}
|
|
if !IsNil(o.Workload) {
|
|
toSerialize["workload"] = o.Workload
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GuideStrategyView) UnmarshalJSON(data []byte) (err error) {
|
|
varGuideStrategyView := _GuideStrategyView{}
|
|
|
|
err = json.Unmarshal(data, &varGuideStrategyView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GuideStrategyView(varGuideStrategyView)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "action")
|
|
delete(additionalProperties, "category")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "tags")
|
|
delete(additionalProperties, "workload")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGuideStrategyView struct {
|
|
value *GuideStrategyView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGuideStrategyView) Get() *GuideStrategyView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGuideStrategyView) Set(val *GuideStrategyView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGuideStrategyView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGuideStrategyView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGuideStrategyView(val *GuideStrategyView) *NullableGuideStrategyView {
|
|
return &NullableGuideStrategyView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGuideStrategyView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGuideStrategyView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|