mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.3 KiB
Go
193 lines
5.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 GuideCurriculumView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GuideCurriculumView{}
|
|
|
|
// GuideCurriculumView struct for GuideCurriculumView
|
|
type GuideCurriculumView struct {
|
|
// Curriculum is the enabled journey: its version, title and ordered steps.
|
|
Curriculum *GuideCurriculum `json:"curriculum,omitempty"`
|
|
// Custom is true when the org's OWN curriculum override is active; false when the journey comes from the brand blueprint or the embedded fixture.
|
|
Custom *bool `json:"custom,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GuideCurriculumView GuideCurriculumView
|
|
|
|
// NewGuideCurriculumView instantiates a new GuideCurriculumView 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 NewGuideCurriculumView() *GuideCurriculumView {
|
|
this := GuideCurriculumView{}
|
|
return &this
|
|
}
|
|
|
|
// NewGuideCurriculumViewWithDefaults instantiates a new GuideCurriculumView 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 NewGuideCurriculumViewWithDefaults() *GuideCurriculumView {
|
|
this := GuideCurriculumView{}
|
|
return &this
|
|
}
|
|
|
|
// GetCurriculum returns the Curriculum field value if set, zero value otherwise.
|
|
func (o *GuideCurriculumView) GetCurriculum() GuideCurriculum {
|
|
if o == nil || IsNil(o.Curriculum) {
|
|
var ret GuideCurriculum
|
|
return ret
|
|
}
|
|
return *o.Curriculum
|
|
}
|
|
|
|
// GetCurriculumOk returns a tuple with the Curriculum field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideCurriculumView) GetCurriculumOk() (*GuideCurriculum, bool) {
|
|
if o == nil || IsNil(o.Curriculum) {
|
|
return nil, false
|
|
}
|
|
return o.Curriculum, true
|
|
}
|
|
|
|
// HasCurriculum returns a boolean if a field has been set.
|
|
func (o *GuideCurriculumView) HasCurriculum() bool {
|
|
if o != nil && !IsNil(o.Curriculum) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCurriculum gets a reference to the given GuideCurriculum and assigns it to the Curriculum field.
|
|
func (o *GuideCurriculumView) SetCurriculum(v GuideCurriculum) {
|
|
o.Curriculum = &v
|
|
}
|
|
|
|
// GetCustom returns the Custom field value if set, zero value otherwise.
|
|
func (o *GuideCurriculumView) GetCustom() bool {
|
|
if o == nil || IsNil(o.Custom) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Custom
|
|
}
|
|
|
|
// GetCustomOk returns a tuple with the Custom field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GuideCurriculumView) GetCustomOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Custom) {
|
|
return nil, false
|
|
}
|
|
return o.Custom, true
|
|
}
|
|
|
|
// HasCustom returns a boolean if a field has been set.
|
|
func (o *GuideCurriculumView) HasCustom() bool {
|
|
if o != nil && !IsNil(o.Custom) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCustom gets a reference to the given bool and assigns it to the Custom field.
|
|
func (o *GuideCurriculumView) SetCustom(v bool) {
|
|
o.Custom = &v
|
|
}
|
|
|
|
func (o GuideCurriculumView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GuideCurriculumView) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Curriculum) {
|
|
toSerialize["curriculum"] = o.Curriculum
|
|
}
|
|
if !IsNil(o.Custom) {
|
|
toSerialize["custom"] = o.Custom
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GuideCurriculumView) UnmarshalJSON(data []byte) (err error) {
|
|
varGuideCurriculumView := _GuideCurriculumView{}
|
|
|
|
err = json.Unmarshal(data, &varGuideCurriculumView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GuideCurriculumView(varGuideCurriculumView)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "curriculum")
|
|
delete(additionalProperties, "custom")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGuideCurriculumView struct {
|
|
value *GuideCurriculumView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGuideCurriculumView) Get() *GuideCurriculumView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGuideCurriculumView) Set(val *GuideCurriculumView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGuideCurriculumView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGuideCurriculumView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGuideCurriculumView(val *GuideCurriculumView) *NullableGuideCurriculumView {
|
|
return &NullableGuideCurriculumView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGuideCurriculumView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGuideCurriculumView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|