309 lines
8.4 KiB
Go
309 lines
8.4 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 SchemaQuestionAddByAnswer type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SchemaQuestionAddByAnswer{}
|
|
|
|
// SchemaQuestionAddByAnswer struct for SchemaQuestionAddByAnswer
|
|
type SchemaQuestionAddByAnswer struct {
|
|
AnswerContent string `json:"answer_content"`
|
|
CaptchaCode *string `json:"captcha_code,omitempty"`
|
|
// captcha_id
|
|
CaptchaId *string `json:"captcha_id,omitempty"`
|
|
// content
|
|
Content string `json:"content"`
|
|
MentionUsernameList []string `json:"mention_username_list,omitempty"`
|
|
// tags
|
|
Tags []SchemaTagItem `json:"tags"`
|
|
// question title
|
|
Title string `json:"title"`
|
|
}
|
|
|
|
// NewSchemaQuestionAddByAnswer instantiates a new SchemaQuestionAddByAnswer 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 NewSchemaQuestionAddByAnswer(answerContent string, content string, tags []SchemaTagItem, title string) *SchemaQuestionAddByAnswer {
|
|
this := SchemaQuestionAddByAnswer{}
|
|
this.AnswerContent = answerContent
|
|
this.Content = content
|
|
this.Tags = tags
|
|
this.Title = title
|
|
return &this
|
|
}
|
|
|
|
// NewSchemaQuestionAddByAnswerWithDefaults instantiates a new SchemaQuestionAddByAnswer 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 NewSchemaQuestionAddByAnswerWithDefaults() *SchemaQuestionAddByAnswer {
|
|
this := SchemaQuestionAddByAnswer{}
|
|
return &this
|
|
}
|
|
|
|
// GetAnswerContent returns the AnswerContent field value
|
|
func (o *SchemaQuestionAddByAnswer) GetAnswerContent() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.AnswerContent
|
|
}
|
|
|
|
// GetAnswerContentOk returns a tuple with the AnswerContent field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaQuestionAddByAnswer) GetAnswerContentOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.AnswerContent, true
|
|
}
|
|
|
|
// SetAnswerContent sets field value
|
|
func (o *SchemaQuestionAddByAnswer) SetAnswerContent(v string) {
|
|
o.AnswerContent = v
|
|
}
|
|
|
|
// GetCaptchaCode returns the CaptchaCode field value if set, zero value otherwise.
|
|
func (o *SchemaQuestionAddByAnswer) GetCaptchaCode() string {
|
|
if o == nil || IsNil(o.CaptchaCode) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CaptchaCode
|
|
}
|
|
|
|
// GetCaptchaCodeOk returns a tuple with the CaptchaCode field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaQuestionAddByAnswer) GetCaptchaCodeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CaptchaCode) {
|
|
return nil, false
|
|
}
|
|
return o.CaptchaCode, true
|
|
}
|
|
|
|
// HasCaptchaCode returns a boolean if a field has been set.
|
|
func (o *SchemaQuestionAddByAnswer) HasCaptchaCode() bool {
|
|
if o != nil && !IsNil(o.CaptchaCode) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCaptchaCode gets a reference to the given string and assigns it to the CaptchaCode field.
|
|
func (o *SchemaQuestionAddByAnswer) SetCaptchaCode(v string) {
|
|
o.CaptchaCode = &v
|
|
}
|
|
|
|
// GetCaptchaId returns the CaptchaId field value if set, zero value otherwise.
|
|
func (o *SchemaQuestionAddByAnswer) GetCaptchaId() string {
|
|
if o == nil || IsNil(o.CaptchaId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CaptchaId
|
|
}
|
|
|
|
// GetCaptchaIdOk returns a tuple with the CaptchaId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaQuestionAddByAnswer) GetCaptchaIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CaptchaId) {
|
|
return nil, false
|
|
}
|
|
return o.CaptchaId, true
|
|
}
|
|
|
|
// HasCaptchaId returns a boolean if a field has been set.
|
|
func (o *SchemaQuestionAddByAnswer) HasCaptchaId() bool {
|
|
if o != nil && !IsNil(o.CaptchaId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCaptchaId gets a reference to the given string and assigns it to the CaptchaId field.
|
|
func (o *SchemaQuestionAddByAnswer) SetCaptchaId(v string) {
|
|
o.CaptchaId = &v
|
|
}
|
|
|
|
// GetContent returns the Content field value
|
|
func (o *SchemaQuestionAddByAnswer) GetContent() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Content
|
|
}
|
|
|
|
// GetContentOk returns a tuple with the Content field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaQuestionAddByAnswer) GetContentOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Content, true
|
|
}
|
|
|
|
// SetContent sets field value
|
|
func (o *SchemaQuestionAddByAnswer) SetContent(v string) {
|
|
o.Content = v
|
|
}
|
|
|
|
// GetMentionUsernameList returns the MentionUsernameList field value if set, zero value otherwise.
|
|
func (o *SchemaQuestionAddByAnswer) GetMentionUsernameList() []string {
|
|
if o == nil || IsNil(o.MentionUsernameList) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.MentionUsernameList
|
|
}
|
|
|
|
// GetMentionUsernameListOk returns a tuple with the MentionUsernameList field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaQuestionAddByAnswer) GetMentionUsernameListOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.MentionUsernameList) {
|
|
return nil, false
|
|
}
|
|
return o.MentionUsernameList, true
|
|
}
|
|
|
|
// HasMentionUsernameList returns a boolean if a field has been set.
|
|
func (o *SchemaQuestionAddByAnswer) HasMentionUsernameList() bool {
|
|
if o != nil && !IsNil(o.MentionUsernameList) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMentionUsernameList gets a reference to the given []string and assigns it to the MentionUsernameList field.
|
|
func (o *SchemaQuestionAddByAnswer) SetMentionUsernameList(v []string) {
|
|
o.MentionUsernameList = v
|
|
}
|
|
|
|
// GetTags returns the Tags field value
|
|
func (o *SchemaQuestionAddByAnswer) GetTags() []SchemaTagItem {
|
|
if o == nil {
|
|
var ret []SchemaTagItem
|
|
return ret
|
|
}
|
|
|
|
return o.Tags
|
|
}
|
|
|
|
// GetTagsOk returns a tuple with the Tags field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaQuestionAddByAnswer) GetTagsOk() ([]SchemaTagItem, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.Tags, true
|
|
}
|
|
|
|
// SetTags sets field value
|
|
func (o *SchemaQuestionAddByAnswer) SetTags(v []SchemaTagItem) {
|
|
o.Tags = v
|
|
}
|
|
|
|
// GetTitle returns the Title field value
|
|
func (o *SchemaQuestionAddByAnswer) GetTitle() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Title
|
|
}
|
|
|
|
// GetTitleOk returns a tuple with the Title field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaQuestionAddByAnswer) GetTitleOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Title, true
|
|
}
|
|
|
|
// SetTitle sets field value
|
|
func (o *SchemaQuestionAddByAnswer) SetTitle(v string) {
|
|
o.Title = v
|
|
}
|
|
|
|
func (o SchemaQuestionAddByAnswer) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o SchemaQuestionAddByAnswer) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["answer_content"] = o.AnswerContent
|
|
if !IsNil(o.CaptchaCode) {
|
|
toSerialize["captcha_code"] = o.CaptchaCode
|
|
}
|
|
if !IsNil(o.CaptchaId) {
|
|
toSerialize["captcha_id"] = o.CaptchaId
|
|
}
|
|
toSerialize["content"] = o.Content
|
|
if !IsNil(o.MentionUsernameList) {
|
|
toSerialize["mention_username_list"] = o.MentionUsernameList
|
|
}
|
|
toSerialize["tags"] = o.Tags
|
|
toSerialize["title"] = o.Title
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableSchemaQuestionAddByAnswer struct {
|
|
value *SchemaQuestionAddByAnswer
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSchemaQuestionAddByAnswer) Get() *SchemaQuestionAddByAnswer {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSchemaQuestionAddByAnswer) Set(val *SchemaQuestionAddByAnswer) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSchemaQuestionAddByAnswer) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSchemaQuestionAddByAnswer) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSchemaQuestionAddByAnswer(val *SchemaQuestionAddByAnswer) *NullableSchemaQuestionAddByAnswer {
|
|
return &NullableSchemaQuestionAddByAnswer{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSchemaQuestionAddByAnswer) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSchemaQuestionAddByAnswer) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|