Files
openapi-go-answer/model_schema_user_notice_set_resp.go
2023-08-22 10:37:28 +08:00

125 lines
3.5 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 openapi
import (
"encoding/json"
)
// checks if the SchemaUserNoticeSetResp type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SchemaUserNoticeSetResp{}
// SchemaUserNoticeSetResp struct for SchemaUserNoticeSetResp
type SchemaUserNoticeSetResp struct {
NoticeSwitch *bool `json:"notice_switch,omitempty"`
}
// NewSchemaUserNoticeSetResp instantiates a new SchemaUserNoticeSetResp 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 NewSchemaUserNoticeSetResp() *SchemaUserNoticeSetResp {
this := SchemaUserNoticeSetResp{}
return &this
}
// NewSchemaUserNoticeSetRespWithDefaults instantiates a new SchemaUserNoticeSetResp 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 NewSchemaUserNoticeSetRespWithDefaults() *SchemaUserNoticeSetResp {
this := SchemaUserNoticeSetResp{}
return &this
}
// GetNoticeSwitch returns the NoticeSwitch field value if set, zero value otherwise.
func (o *SchemaUserNoticeSetResp) GetNoticeSwitch() bool {
if o == nil || IsNil(o.NoticeSwitch) {
var ret bool
return ret
}
return *o.NoticeSwitch
}
// GetNoticeSwitchOk returns a tuple with the NoticeSwitch field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaUserNoticeSetResp) GetNoticeSwitchOk() (*bool, bool) {
if o == nil || IsNil(o.NoticeSwitch) {
return nil, false
}
return o.NoticeSwitch, true
}
// HasNoticeSwitch returns a boolean if a field has been set.
func (o *SchemaUserNoticeSetResp) HasNoticeSwitch() bool {
if o != nil && !IsNil(o.NoticeSwitch) {
return true
}
return false
}
// SetNoticeSwitch gets a reference to the given bool and assigns it to the NoticeSwitch field.
func (o *SchemaUserNoticeSetResp) SetNoticeSwitch(v bool) {
o.NoticeSwitch = &v
}
func (o SchemaUserNoticeSetResp) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SchemaUserNoticeSetResp) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.NoticeSwitch) {
toSerialize["notice_switch"] = o.NoticeSwitch
}
return toSerialize, nil
}
type NullableSchemaUserNoticeSetResp struct {
value *SchemaUserNoticeSetResp
isSet bool
}
func (v NullableSchemaUserNoticeSetResp) Get() *SchemaUserNoticeSetResp {
return v.value
}
func (v *NullableSchemaUserNoticeSetResp) Set(val *SchemaUserNoticeSetResp) {
v.value = val
v.isSet = true
}
func (v NullableSchemaUserNoticeSetResp) IsSet() bool {
return v.isSet
}
func (v *NullableSchemaUserNoticeSetResp) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSchemaUserNoticeSetResp(val *SchemaUserNoticeSetResp) *NullableSchemaUserNoticeSetResp {
return &NullableSchemaUserNoticeSetResp{value: val, isSet: true}
}
func (v NullableSchemaUserNoticeSetResp) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSchemaUserNoticeSetResp) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}