mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
229 lines
5.9 KiB
Go
229 lines
5.9 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 FrameworkModule type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FrameworkModule{}
|
|
|
|
// FrameworkModule struct for FrameworkModule
|
|
type FrameworkModule struct {
|
|
Doctypes []string `json:"doctypes,omitempty"`
|
|
// Enabled is whether this org has turned the module on. A module that is off answers 404 on every DocType it owns (elective.go).
|
|
Enabled *bool `json:"enabled,omitempty"`
|
|
Module *string `json:"module,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FrameworkModule FrameworkModule
|
|
|
|
// NewFrameworkModule instantiates a new FrameworkModule 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 NewFrameworkModule() *FrameworkModule {
|
|
this := FrameworkModule{}
|
|
return &this
|
|
}
|
|
|
|
// NewFrameworkModuleWithDefaults instantiates a new FrameworkModule 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 NewFrameworkModuleWithDefaults() *FrameworkModule {
|
|
this := FrameworkModule{}
|
|
return &this
|
|
}
|
|
|
|
// GetDoctypes returns the Doctypes field value if set, zero value otherwise.
|
|
func (o *FrameworkModule) GetDoctypes() []string {
|
|
if o == nil || IsNil(o.Doctypes) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Doctypes
|
|
}
|
|
|
|
// GetDoctypesOk returns a tuple with the Doctypes field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FrameworkModule) GetDoctypesOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Doctypes) {
|
|
return nil, false
|
|
}
|
|
return o.Doctypes, true
|
|
}
|
|
|
|
// HasDoctypes returns a boolean if a field has been set.
|
|
func (o *FrameworkModule) HasDoctypes() bool {
|
|
if o != nil && !IsNil(o.Doctypes) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDoctypes gets a reference to the given []string and assigns it to the Doctypes field.
|
|
func (o *FrameworkModule) SetDoctypes(v []string) {
|
|
o.Doctypes = v
|
|
}
|
|
|
|
// GetEnabled returns the Enabled field value if set, zero value otherwise.
|
|
func (o *FrameworkModule) GetEnabled() bool {
|
|
if o == nil || IsNil(o.Enabled) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Enabled
|
|
}
|
|
|
|
// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FrameworkModule) GetEnabledOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Enabled) {
|
|
return nil, false
|
|
}
|
|
return o.Enabled, true
|
|
}
|
|
|
|
// HasEnabled returns a boolean if a field has been set.
|
|
func (o *FrameworkModule) HasEnabled() bool {
|
|
if o != nil && !IsNil(o.Enabled) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEnabled gets a reference to the given bool and assigns it to the Enabled field.
|
|
func (o *FrameworkModule) SetEnabled(v bool) {
|
|
o.Enabled = &v
|
|
}
|
|
|
|
// GetModule returns the Module field value if set, zero value otherwise.
|
|
func (o *FrameworkModule) GetModule() string {
|
|
if o == nil || IsNil(o.Module) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Module
|
|
}
|
|
|
|
// GetModuleOk returns a tuple with the Module field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FrameworkModule) GetModuleOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Module) {
|
|
return nil, false
|
|
}
|
|
return o.Module, true
|
|
}
|
|
|
|
// HasModule returns a boolean if a field has been set.
|
|
func (o *FrameworkModule) HasModule() bool {
|
|
if o != nil && !IsNil(o.Module) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetModule gets a reference to the given string and assigns it to the Module field.
|
|
func (o *FrameworkModule) SetModule(v string) {
|
|
o.Module = &v
|
|
}
|
|
|
|
func (o FrameworkModule) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FrameworkModule) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Doctypes) {
|
|
toSerialize["doctypes"] = o.Doctypes
|
|
}
|
|
if !IsNil(o.Enabled) {
|
|
toSerialize["enabled"] = o.Enabled
|
|
}
|
|
if !IsNil(o.Module) {
|
|
toSerialize["module"] = o.Module
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FrameworkModule) UnmarshalJSON(data []byte) (err error) {
|
|
varFrameworkModule := _FrameworkModule{}
|
|
|
|
err = json.Unmarshal(data, &varFrameworkModule)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FrameworkModule(varFrameworkModule)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "doctypes")
|
|
delete(additionalProperties, "enabled")
|
|
delete(additionalProperties, "module")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFrameworkModule struct {
|
|
value *FrameworkModule
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFrameworkModule) Get() *FrameworkModule {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFrameworkModule) Set(val *FrameworkModule) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFrameworkModule) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFrameworkModule) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFrameworkModule(val *FrameworkModule) *NullableFrameworkModule {
|
|
return &NullableFrameworkModule{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFrameworkModule) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFrameworkModule) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|