mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
7.4 KiB
Go
269 lines
7.4 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 GuideProgressView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GuideProgressView{}
|
|
|
|
// GuideProgressView struct for GuideProgressView
|
|
type GuideProgressView struct {
|
|
// Done counts steps that are FINISHED — done and skipped alike, since a step the org deliberately passed over is not still owed. It therefore rises when somebody skips, which is the intended reading of a checklist.
|
|
Done *int64 `json:"done,omitempty"`
|
|
// Next is the id of the step to do next: the first available, unfinished step in authoring order. Empty when the journey is complete, and also empty when every remaining step is blocked by a dependency.
|
|
Next *string `json:"next,omitempty"`
|
|
// Percent is done/total as a whole number 0-100, rounded, so a caller renders a bar without recomputing it. Total zero reads as 0.
|
|
Percent *int64 `json:"percent,omitempty"`
|
|
// Total is how many steps this org's journey holds — the ENABLED steps of the playbook, so it shrinks when an operator disables one and does not match the authored step count.
|
|
Total *int64 `json:"total,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GuideProgressView GuideProgressView
|
|
|
|
// NewGuideProgressView instantiates a new GuideProgressView 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 NewGuideProgressView() *GuideProgressView {
|
|
this := GuideProgressView{}
|
|
return &this
|
|
}
|
|
|
|
// NewGuideProgressViewWithDefaults instantiates a new GuideProgressView 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 NewGuideProgressViewWithDefaults() *GuideProgressView {
|
|
this := GuideProgressView{}
|
|
return &this
|
|
}
|
|
|
|
// GetDone returns the Done field value if set, zero value otherwise.
|
|
func (o *GuideProgressView) GetDone() int64 {
|
|
if o == nil || IsNil(o.Done) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Done
|
|
}
|
|
|
|
// GetDoneOk returns a tuple with the Done field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideProgressView) GetDoneOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Done) {
|
|
return nil, false
|
|
}
|
|
return o.Done, true
|
|
}
|
|
|
|
// HasDone returns a boolean if a field has been set.
|
|
func (o *GuideProgressView) HasDone() bool {
|
|
if o != nil && !IsNil(o.Done) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDone gets a reference to the given int64 and assigns it to the Done field.
|
|
func (o *GuideProgressView) SetDone(v int64) {
|
|
o.Done = &v
|
|
}
|
|
|
|
// GetNext returns the Next field value if set, zero value otherwise.
|
|
func (o *GuideProgressView) GetNext() string {
|
|
if o == nil || IsNil(o.Next) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Next
|
|
}
|
|
|
|
// GetNextOk returns a tuple with the Next field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideProgressView) GetNextOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Next) {
|
|
return nil, false
|
|
}
|
|
return o.Next, true
|
|
}
|
|
|
|
// HasNext returns a boolean if a field has been set.
|
|
func (o *GuideProgressView) HasNext() bool {
|
|
if o != nil && !IsNil(o.Next) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNext gets a reference to the given string and assigns it to the Next field.
|
|
func (o *GuideProgressView) SetNext(v string) {
|
|
o.Next = &v
|
|
}
|
|
|
|
// GetPercent returns the Percent field value if set, zero value otherwise.
|
|
func (o *GuideProgressView) GetPercent() int64 {
|
|
if o == nil || IsNil(o.Percent) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Percent
|
|
}
|
|
|
|
// GetPercentOk returns a tuple with the Percent field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideProgressView) GetPercentOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Percent) {
|
|
return nil, false
|
|
}
|
|
return o.Percent, true
|
|
}
|
|
|
|
// HasPercent returns a boolean if a field has been set.
|
|
func (o *GuideProgressView) HasPercent() bool {
|
|
if o != nil && !IsNil(o.Percent) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPercent gets a reference to the given int64 and assigns it to the Percent field.
|
|
func (o *GuideProgressView) SetPercent(v int64) {
|
|
o.Percent = &v
|
|
}
|
|
|
|
// GetTotal returns the Total field value if set, zero value otherwise.
|
|
func (o *GuideProgressView) GetTotal() int64 {
|
|
if o == nil || IsNil(o.Total) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Total
|
|
}
|
|
|
|
// GetTotalOk returns a tuple with the Total field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideProgressView) GetTotalOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Total) {
|
|
return nil, false
|
|
}
|
|
return o.Total, true
|
|
}
|
|
|
|
// HasTotal returns a boolean if a field has been set.
|
|
func (o *GuideProgressView) HasTotal() bool {
|
|
if o != nil && !IsNil(o.Total) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTotal gets a reference to the given int64 and assigns it to the Total field.
|
|
func (o *GuideProgressView) SetTotal(v int64) {
|
|
o.Total = &v
|
|
}
|
|
|
|
func (o GuideProgressView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GuideProgressView) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Done) {
|
|
toSerialize["done"] = o.Done
|
|
}
|
|
if !IsNil(o.Next) {
|
|
toSerialize["next"] = o.Next
|
|
}
|
|
if !IsNil(o.Percent) {
|
|
toSerialize["percent"] = o.Percent
|
|
}
|
|
if !IsNil(o.Total) {
|
|
toSerialize["total"] = o.Total
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GuideProgressView) UnmarshalJSON(data []byte) (err error) {
|
|
varGuideProgressView := _GuideProgressView{}
|
|
|
|
err = json.Unmarshal(data, &varGuideProgressView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GuideProgressView(varGuideProgressView)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "done")
|
|
delete(additionalProperties, "next")
|
|
delete(additionalProperties, "percent")
|
|
delete(additionalProperties, "total")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGuideProgressView struct {
|
|
value *GuideProgressView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGuideProgressView) Get() *GuideProgressView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGuideProgressView) Set(val *GuideProgressView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGuideProgressView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGuideProgressView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGuideProgressView(val *GuideProgressView) *NullableGuideProgressView {
|
|
return &NullableGuideProgressView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGuideProgressView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGuideProgressView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|