197 lines
6.9 KiB
Go
197 lines
6.9 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 SchemaUpdateUserNotificationConfigReq type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SchemaUpdateUserNotificationConfigReq{}
|
|
|
|
// SchemaUpdateUserNotificationConfigReq struct for SchemaUpdateUserNotificationConfigReq
|
|
type SchemaUpdateUserNotificationConfigReq struct {
|
|
AllNewQuestion []SchemaNotificationChannelConfig `json:"all_new_question,omitempty"`
|
|
AllNewQuestionForFollowingTags []SchemaNotificationChannelConfig `json:"all_new_question_for_following_tags,omitempty"`
|
|
Inbox []SchemaNotificationChannelConfig `json:"inbox,omitempty"`
|
|
}
|
|
|
|
// NewSchemaUpdateUserNotificationConfigReq instantiates a new SchemaUpdateUserNotificationConfigReq 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 NewSchemaUpdateUserNotificationConfigReq() *SchemaUpdateUserNotificationConfigReq {
|
|
this := SchemaUpdateUserNotificationConfigReq{}
|
|
return &this
|
|
}
|
|
|
|
// NewSchemaUpdateUserNotificationConfigReqWithDefaults instantiates a new SchemaUpdateUserNotificationConfigReq 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 NewSchemaUpdateUserNotificationConfigReqWithDefaults() *SchemaUpdateUserNotificationConfigReq {
|
|
this := SchemaUpdateUserNotificationConfigReq{}
|
|
return &this
|
|
}
|
|
|
|
// GetAllNewQuestion returns the AllNewQuestion field value if set, zero value otherwise.
|
|
func (o *SchemaUpdateUserNotificationConfigReq) GetAllNewQuestion() []SchemaNotificationChannelConfig {
|
|
if o == nil || IsNil(o.AllNewQuestion) {
|
|
var ret []SchemaNotificationChannelConfig
|
|
return ret
|
|
}
|
|
return o.AllNewQuestion
|
|
}
|
|
|
|
// GetAllNewQuestionOk returns a tuple with the AllNewQuestion field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaUpdateUserNotificationConfigReq) GetAllNewQuestionOk() ([]SchemaNotificationChannelConfig, bool) {
|
|
if o == nil || IsNil(o.AllNewQuestion) {
|
|
return nil, false
|
|
}
|
|
return o.AllNewQuestion, true
|
|
}
|
|
|
|
// HasAllNewQuestion returns a boolean if a field has been set.
|
|
func (o *SchemaUpdateUserNotificationConfigReq) HasAllNewQuestion() bool {
|
|
if o != nil && !IsNil(o.AllNewQuestion) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAllNewQuestion gets a reference to the given []SchemaNotificationChannelConfig and assigns it to the AllNewQuestion field.
|
|
func (o *SchemaUpdateUserNotificationConfigReq) SetAllNewQuestion(v []SchemaNotificationChannelConfig) {
|
|
o.AllNewQuestion = v
|
|
}
|
|
|
|
// GetAllNewQuestionForFollowingTags returns the AllNewQuestionForFollowingTags field value if set, zero value otherwise.
|
|
func (o *SchemaUpdateUserNotificationConfigReq) GetAllNewQuestionForFollowingTags() []SchemaNotificationChannelConfig {
|
|
if o == nil || IsNil(o.AllNewQuestionForFollowingTags) {
|
|
var ret []SchemaNotificationChannelConfig
|
|
return ret
|
|
}
|
|
return o.AllNewQuestionForFollowingTags
|
|
}
|
|
|
|
// GetAllNewQuestionForFollowingTagsOk returns a tuple with the AllNewQuestionForFollowingTags field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaUpdateUserNotificationConfigReq) GetAllNewQuestionForFollowingTagsOk() ([]SchemaNotificationChannelConfig, bool) {
|
|
if o == nil || IsNil(o.AllNewQuestionForFollowingTags) {
|
|
return nil, false
|
|
}
|
|
return o.AllNewQuestionForFollowingTags, true
|
|
}
|
|
|
|
// HasAllNewQuestionForFollowingTags returns a boolean if a field has been set.
|
|
func (o *SchemaUpdateUserNotificationConfigReq) HasAllNewQuestionForFollowingTags() bool {
|
|
if o != nil && !IsNil(o.AllNewQuestionForFollowingTags) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAllNewQuestionForFollowingTags gets a reference to the given []SchemaNotificationChannelConfig and assigns it to the AllNewQuestionForFollowingTags field.
|
|
func (o *SchemaUpdateUserNotificationConfigReq) SetAllNewQuestionForFollowingTags(v []SchemaNotificationChannelConfig) {
|
|
o.AllNewQuestionForFollowingTags = v
|
|
}
|
|
|
|
// GetInbox returns the Inbox field value if set, zero value otherwise.
|
|
func (o *SchemaUpdateUserNotificationConfigReq) GetInbox() []SchemaNotificationChannelConfig {
|
|
if o == nil || IsNil(o.Inbox) {
|
|
var ret []SchemaNotificationChannelConfig
|
|
return ret
|
|
}
|
|
return o.Inbox
|
|
}
|
|
|
|
// GetInboxOk returns a tuple with the Inbox field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaUpdateUserNotificationConfigReq) GetInboxOk() ([]SchemaNotificationChannelConfig, bool) {
|
|
if o == nil || IsNil(o.Inbox) {
|
|
return nil, false
|
|
}
|
|
return o.Inbox, true
|
|
}
|
|
|
|
// HasInbox returns a boolean if a field has been set.
|
|
func (o *SchemaUpdateUserNotificationConfigReq) HasInbox() bool {
|
|
if o != nil && !IsNil(o.Inbox) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetInbox gets a reference to the given []SchemaNotificationChannelConfig and assigns it to the Inbox field.
|
|
func (o *SchemaUpdateUserNotificationConfigReq) SetInbox(v []SchemaNotificationChannelConfig) {
|
|
o.Inbox = v
|
|
}
|
|
|
|
func (o SchemaUpdateUserNotificationConfigReq) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o SchemaUpdateUserNotificationConfigReq) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.AllNewQuestion) {
|
|
toSerialize["all_new_question"] = o.AllNewQuestion
|
|
}
|
|
if !IsNil(o.AllNewQuestionForFollowingTags) {
|
|
toSerialize["all_new_question_for_following_tags"] = o.AllNewQuestionForFollowingTags
|
|
}
|
|
if !IsNil(o.Inbox) {
|
|
toSerialize["inbox"] = o.Inbox
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableSchemaUpdateUserNotificationConfigReq struct {
|
|
value *SchemaUpdateUserNotificationConfigReq
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSchemaUpdateUserNotificationConfigReq) Get() *SchemaUpdateUserNotificationConfigReq {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSchemaUpdateUserNotificationConfigReq) Set(val *SchemaUpdateUserNotificationConfigReq) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSchemaUpdateUserNotificationConfigReq) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSchemaUpdateUserNotificationConfigReq) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSchemaUpdateUserNotificationConfigReq(val *SchemaUpdateUserNotificationConfigReq) *NullableSchemaUpdateUserNotificationConfigReq {
|
|
return &NullableSchemaUpdateUserNotificationConfigReq{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSchemaUpdateUserNotificationConfigReq) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSchemaUpdateUserNotificationConfigReq) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|