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

125 lines
3.6 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 SchemaUserNoticeSetRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SchemaUserNoticeSetRequest{}
// SchemaUserNoticeSetRequest struct for SchemaUserNoticeSetRequest
type SchemaUserNoticeSetRequest struct {
NoticeSwitch *bool `json:"notice_switch,omitempty"`
}
// NewSchemaUserNoticeSetRequest instantiates a new SchemaUserNoticeSetRequest 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 NewSchemaUserNoticeSetRequest() *SchemaUserNoticeSetRequest {
this := SchemaUserNoticeSetRequest{}
return &this
}
// NewSchemaUserNoticeSetRequestWithDefaults instantiates a new SchemaUserNoticeSetRequest 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 NewSchemaUserNoticeSetRequestWithDefaults() *SchemaUserNoticeSetRequest {
this := SchemaUserNoticeSetRequest{}
return &this
}
// GetNoticeSwitch returns the NoticeSwitch field value if set, zero value otherwise.
func (o *SchemaUserNoticeSetRequest) 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 *SchemaUserNoticeSetRequest) 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 *SchemaUserNoticeSetRequest) 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 *SchemaUserNoticeSetRequest) SetNoticeSwitch(v bool) {
o.NoticeSwitch = &v
}
func (o SchemaUserNoticeSetRequest) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SchemaUserNoticeSetRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.NoticeSwitch) {
toSerialize["notice_switch"] = o.NoticeSwitch
}
return toSerialize, nil
}
type NullableSchemaUserNoticeSetRequest struct {
value *SchemaUserNoticeSetRequest
isSet bool
}
func (v NullableSchemaUserNoticeSetRequest) Get() *SchemaUserNoticeSetRequest {
return v.value
}
func (v *NullableSchemaUserNoticeSetRequest) Set(val *SchemaUserNoticeSetRequest) {
v.value = val
v.isSet = true
}
func (v NullableSchemaUserNoticeSetRequest) IsSet() bool {
return v.isSet
}
func (v *NullableSchemaUserNoticeSetRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSchemaUserNoticeSetRequest(val *SchemaUserNoticeSetRequest) *NullableSchemaUserNoticeSetRequest {
return &NullableSchemaUserNoticeSetRequest{value: val, isSet: true}
}
func (v NullableSchemaUserNoticeSetRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSchemaUserNoticeSetRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}