mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
6.1 KiB
Go
231 lines
6.1 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 GuideCorpusView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GuideCorpusView{}
|
|
|
|
// GuideCorpusView struct for GuideCorpusView
|
|
type GuideCorpusView struct {
|
|
// Count is how many tactics survived every filter.
|
|
Count *int64 `json:"count,omitempty"`
|
|
// Stage is the growth stage the tag join ran at — the org's observed stage, or the one ?stage= previewed.
|
|
Stage *string `json:"stage,omitempty"`
|
|
// Strategies are the surviving tactics, in corpus authoring order.
|
|
Strategies []GuideStrategyView `json:"strategies,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GuideCorpusView GuideCorpusView
|
|
|
|
// NewGuideCorpusView instantiates a new GuideCorpusView 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 NewGuideCorpusView() *GuideCorpusView {
|
|
this := GuideCorpusView{}
|
|
return &this
|
|
}
|
|
|
|
// NewGuideCorpusViewWithDefaults instantiates a new GuideCorpusView 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 NewGuideCorpusViewWithDefaults() *GuideCorpusView {
|
|
this := GuideCorpusView{}
|
|
return &this
|
|
}
|
|
|
|
// GetCount returns the Count field value if set, zero value otherwise.
|
|
func (o *GuideCorpusView) GetCount() int64 {
|
|
if o == nil || IsNil(o.Count) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Count
|
|
}
|
|
|
|
// GetCountOk returns a tuple with the Count field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideCorpusView) GetCountOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Count) {
|
|
return nil, false
|
|
}
|
|
return o.Count, true
|
|
}
|
|
|
|
// HasCount returns a boolean if a field has been set.
|
|
func (o *GuideCorpusView) HasCount() bool {
|
|
if o != nil && !IsNil(o.Count) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCount gets a reference to the given int64 and assigns it to the Count field.
|
|
func (o *GuideCorpusView) SetCount(v int64) {
|
|
o.Count = &v
|
|
}
|
|
|
|
// GetStage returns the Stage field value if set, zero value otherwise.
|
|
func (o *GuideCorpusView) GetStage() string {
|
|
if o == nil || IsNil(o.Stage) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Stage
|
|
}
|
|
|
|
// GetStageOk returns a tuple with the Stage field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideCorpusView) GetStageOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Stage) {
|
|
return nil, false
|
|
}
|
|
return o.Stage, true
|
|
}
|
|
|
|
// HasStage returns a boolean if a field has been set.
|
|
func (o *GuideCorpusView) HasStage() bool {
|
|
if o != nil && !IsNil(o.Stage) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStage gets a reference to the given string and assigns it to the Stage field.
|
|
func (o *GuideCorpusView) SetStage(v string) {
|
|
o.Stage = &v
|
|
}
|
|
|
|
// GetStrategies returns the Strategies field value if set, zero value otherwise.
|
|
func (o *GuideCorpusView) GetStrategies() []GuideStrategyView {
|
|
if o == nil || IsNil(o.Strategies) {
|
|
var ret []GuideStrategyView
|
|
return ret
|
|
}
|
|
return o.Strategies
|
|
}
|
|
|
|
// GetStrategiesOk returns a tuple with the Strategies field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideCorpusView) GetStrategiesOk() ([]GuideStrategyView, bool) {
|
|
if o == nil || IsNil(o.Strategies) {
|
|
return nil, false
|
|
}
|
|
return o.Strategies, true
|
|
}
|
|
|
|
// HasStrategies returns a boolean if a field has been set.
|
|
func (o *GuideCorpusView) HasStrategies() bool {
|
|
if o != nil && !IsNil(o.Strategies) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStrategies gets a reference to the given []GuideStrategyView and assigns it to the Strategies field.
|
|
func (o *GuideCorpusView) SetStrategies(v []GuideStrategyView) {
|
|
o.Strategies = v
|
|
}
|
|
|
|
func (o GuideCorpusView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GuideCorpusView) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Count) {
|
|
toSerialize["count"] = o.Count
|
|
}
|
|
if !IsNil(o.Stage) {
|
|
toSerialize["stage"] = o.Stage
|
|
}
|
|
if !IsNil(o.Strategies) {
|
|
toSerialize["strategies"] = o.Strategies
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GuideCorpusView) UnmarshalJSON(data []byte) (err error) {
|
|
varGuideCorpusView := _GuideCorpusView{}
|
|
|
|
err = json.Unmarshal(data, &varGuideCorpusView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GuideCorpusView(varGuideCorpusView)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "count")
|
|
delete(additionalProperties, "stage")
|
|
delete(additionalProperties, "strategies")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGuideCorpusView struct {
|
|
value *GuideCorpusView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGuideCorpusView) Get() *GuideCorpusView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGuideCorpusView) Set(val *GuideCorpusView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGuideCorpusView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGuideCorpusView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGuideCorpusView(val *GuideCorpusView) *NullableGuideCorpusView {
|
|
return &NullableGuideCorpusView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGuideCorpusView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGuideCorpusView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|