Files
sdk/model_framework_module_state.go

228 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 FrameworkModuleState type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &FrameworkModuleState{}
// FrameworkModuleState struct for FrameworkModuleState
type FrameworkModuleState struct {
Doctypes []string `json:"doctypes,omitempty"`
Installed []string `json:"installed,omitempty"`
Module *string `json:"module,omitempty"`
AdditionalProperties map[string]interface{}
}
type _FrameworkModuleState FrameworkModuleState
// NewFrameworkModuleState instantiates a new FrameworkModuleState 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 NewFrameworkModuleState() *FrameworkModuleState {
this := FrameworkModuleState{}
return &this
}
// NewFrameworkModuleStateWithDefaults instantiates a new FrameworkModuleState 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 NewFrameworkModuleStateWithDefaults() *FrameworkModuleState {
this := FrameworkModuleState{}
return &this
}
// GetDoctypes returns the Doctypes field value if set, zero value otherwise.
func (o *FrameworkModuleState) 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 *FrameworkModuleState) 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 *FrameworkModuleState) 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 *FrameworkModuleState) SetDoctypes(v []string) {
o.Doctypes = v
}
// GetInstalled returns the Installed field value if set, zero value otherwise.
func (o *FrameworkModuleState) GetInstalled() []string {
if o == nil || IsNil(o.Installed) {
var ret []string
return ret
}
return o.Installed
}
// GetInstalledOk returns a tuple with the Installed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FrameworkModuleState) GetInstalledOk() ([]string, bool) {
if o == nil || IsNil(o.Installed) {
return nil, false
}
return o.Installed, true
}
// HasInstalled returns a boolean if a field has been set.
func (o *FrameworkModuleState) HasInstalled() bool {
if o != nil && !IsNil(o.Installed) {
return true
}
return false
}
// SetInstalled gets a reference to the given []string and assigns it to the Installed field.
func (o *FrameworkModuleState) SetInstalled(v []string) {
o.Installed = v
}
// GetModule returns the Module field value if set, zero value otherwise.
func (o *FrameworkModuleState) 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 *FrameworkModuleState) 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 *FrameworkModuleState) 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 *FrameworkModuleState) SetModule(v string) {
o.Module = &v
}
func (o FrameworkModuleState) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o FrameworkModuleState) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Doctypes) {
toSerialize["doctypes"] = o.Doctypes
}
if !IsNil(o.Installed) {
toSerialize["installed"] = o.Installed
}
if !IsNil(o.Module) {
toSerialize["module"] = o.Module
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *FrameworkModuleState) UnmarshalJSON(data []byte) (err error) {
varFrameworkModuleState := _FrameworkModuleState{}
err = json.Unmarshal(data, &varFrameworkModuleState)
if err != nil {
return err
}
*o = FrameworkModuleState(varFrameworkModuleState)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "doctypes")
delete(additionalProperties, "installed")
delete(additionalProperties, "module")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableFrameworkModuleState struct {
value *FrameworkModuleState
isSet bool
}
func (v NullableFrameworkModuleState) Get() *FrameworkModuleState {
return v.value
}
func (v *NullableFrameworkModuleState) Set(val *FrameworkModuleState) {
v.value = val
v.isSet = true
}
func (v NullableFrameworkModuleState) IsSet() bool {
return v.isSet
}
func (v *NullableFrameworkModuleState) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFrameworkModuleState(val *FrameworkModuleState) *NullableFrameworkModuleState {
return &NullableFrameworkModuleState{value: val, isSet: true}
}
func (v NullableFrameworkModuleState) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFrameworkModuleState) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}