Files
openapi-go-answer/model_schema_site_theme_req.go
2023-09-26 16:20:01 +08:00

152 lines
4.0 KiB
Go

/*
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package answer_sdk
import (
"encoding/json"
)
// checks if the SchemaSiteThemeReq type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SchemaSiteThemeReq{}
// SchemaSiteThemeReq struct for SchemaSiteThemeReq
type SchemaSiteThemeReq struct {
Theme string `json:"theme"`
ThemeConfig map[string]interface{} `json:"theme_config,omitempty"`
}
// NewSchemaSiteThemeReq instantiates a new SchemaSiteThemeReq 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 NewSchemaSiteThemeReq(theme string) *SchemaSiteThemeReq {
this := SchemaSiteThemeReq{}
this.Theme = theme
return &this
}
// NewSchemaSiteThemeReqWithDefaults instantiates a new SchemaSiteThemeReq 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 NewSchemaSiteThemeReqWithDefaults() *SchemaSiteThemeReq {
this := SchemaSiteThemeReq{}
return &this
}
// GetTheme returns the Theme field value
func (o *SchemaSiteThemeReq) GetTheme() string {
if o == nil {
var ret string
return ret
}
return o.Theme
}
// GetThemeOk returns a tuple with the Theme field value
// and a boolean to check if the value has been set.
func (o *SchemaSiteThemeReq) GetThemeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Theme, true
}
// SetTheme sets field value
func (o *SchemaSiteThemeReq) SetTheme(v string) {
o.Theme = v
}
// GetThemeConfig returns the ThemeConfig field value if set, zero value otherwise.
func (o *SchemaSiteThemeReq) GetThemeConfig() map[string]interface{} {
if o == nil || IsNil(o.ThemeConfig) {
var ret map[string]interface{}
return ret
}
return o.ThemeConfig
}
// GetThemeConfigOk returns a tuple with the ThemeConfig field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaSiteThemeReq) GetThemeConfigOk() (map[string]interface{}, bool) {
if o == nil || IsNil(o.ThemeConfig) {
return map[string]interface{}{}, false
}
return o.ThemeConfig, true
}
// HasThemeConfig returns a boolean if a field has been set.
func (o *SchemaSiteThemeReq) HasThemeConfig() bool {
if o != nil && !IsNil(o.ThemeConfig) {
return true
}
return false
}
// SetThemeConfig gets a reference to the given map[string]interface{} and assigns it to the ThemeConfig field.
func (o *SchemaSiteThemeReq) SetThemeConfig(v map[string]interface{}) {
o.ThemeConfig = v
}
func (o SchemaSiteThemeReq) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SchemaSiteThemeReq) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["theme"] = o.Theme
if !IsNil(o.ThemeConfig) {
toSerialize["theme_config"] = o.ThemeConfig
}
return toSerialize, nil
}
type NullableSchemaSiteThemeReq struct {
value *SchemaSiteThemeReq
isSet bool
}
func (v NullableSchemaSiteThemeReq) Get() *SchemaSiteThemeReq {
return v.value
}
func (v *NullableSchemaSiteThemeReq) Set(val *SchemaSiteThemeReq) {
v.value = val
v.isSet = true
}
func (v NullableSchemaSiteThemeReq) IsSet() bool {
return v.isSet
}
func (v *NullableSchemaSiteThemeReq) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSchemaSiteThemeReq(val *SchemaSiteThemeReq) *NullableSchemaSiteThemeReq {
return &NullableSchemaSiteThemeReq{value: val, isSet: true}
}
func (v NullableSchemaSiteThemeReq) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSchemaSiteThemeReq) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}