/* 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 SchemaAnswerUpdateReq type satisfies the MappedNullable interface at compile time var _ MappedNullable = &SchemaAnswerUpdateReq{} // SchemaAnswerUpdateReq struct for SchemaAnswerUpdateReq type SchemaAnswerUpdateReq struct { CaptchaCode *string `json:"captcha_code,omitempty"` // captcha_id CaptchaId *string `json:"captcha_id,omitempty"` Content string `json:"content"` EditSummary *string `json:"edit_summary,omitempty"` Id *string `json:"id,omitempty"` QuestionId *string `json:"question_id,omitempty"` Title *string `json:"title,omitempty"` } // NewSchemaAnswerUpdateReq instantiates a new SchemaAnswerUpdateReq 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 NewSchemaAnswerUpdateReq(content string) *SchemaAnswerUpdateReq { this := SchemaAnswerUpdateReq{} this.Content = content return &this } // NewSchemaAnswerUpdateReqWithDefaults instantiates a new SchemaAnswerUpdateReq 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 NewSchemaAnswerUpdateReqWithDefaults() *SchemaAnswerUpdateReq { this := SchemaAnswerUpdateReq{} return &this } // GetCaptchaCode returns the CaptchaCode field value if set, zero value otherwise. func (o *SchemaAnswerUpdateReq) 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 *SchemaAnswerUpdateReq) 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 *SchemaAnswerUpdateReq) 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 *SchemaAnswerUpdateReq) SetCaptchaCode(v string) { o.CaptchaCode = &v } // GetCaptchaId returns the CaptchaId field value if set, zero value otherwise. func (o *SchemaAnswerUpdateReq) 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 *SchemaAnswerUpdateReq) 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 *SchemaAnswerUpdateReq) 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 *SchemaAnswerUpdateReq) SetCaptchaId(v string) { o.CaptchaId = &v } // GetContent returns the Content field value func (o *SchemaAnswerUpdateReq) 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 *SchemaAnswerUpdateReq) GetContentOk() (*string, bool) { if o == nil { return nil, false } return &o.Content, true } // SetContent sets field value func (o *SchemaAnswerUpdateReq) SetContent(v string) { o.Content = v } // GetEditSummary returns the EditSummary field value if set, zero value otherwise. func (o *SchemaAnswerUpdateReq) GetEditSummary() string { if o == nil || IsNil(o.EditSummary) { var ret string return ret } return *o.EditSummary } // GetEditSummaryOk returns a tuple with the EditSummary field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SchemaAnswerUpdateReq) GetEditSummaryOk() (*string, bool) { if o == nil || IsNil(o.EditSummary) { return nil, false } return o.EditSummary, true } // HasEditSummary returns a boolean if a field has been set. func (o *SchemaAnswerUpdateReq) HasEditSummary() bool { if o != nil && !IsNil(o.EditSummary) { return true } return false } // SetEditSummary gets a reference to the given string and assigns it to the EditSummary field. func (o *SchemaAnswerUpdateReq) SetEditSummary(v string) { o.EditSummary = &v } // GetId returns the Id field value if set, zero value otherwise. func (o *SchemaAnswerUpdateReq) GetId() string { if o == nil || IsNil(o.Id) { var ret string return ret } return *o.Id } // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SchemaAnswerUpdateReq) GetIdOk() (*string, bool) { if o == nil || IsNil(o.Id) { return nil, false } return o.Id, true } // HasId returns a boolean if a field has been set. func (o *SchemaAnswerUpdateReq) HasId() bool { if o != nil && !IsNil(o.Id) { return true } return false } // SetId gets a reference to the given string and assigns it to the Id field. func (o *SchemaAnswerUpdateReq) SetId(v string) { o.Id = &v } // GetQuestionId returns the QuestionId field value if set, zero value otherwise. func (o *SchemaAnswerUpdateReq) GetQuestionId() string { if o == nil || IsNil(o.QuestionId) { var ret string return ret } return *o.QuestionId } // GetQuestionIdOk returns a tuple with the QuestionId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SchemaAnswerUpdateReq) GetQuestionIdOk() (*string, bool) { if o == nil || IsNil(o.QuestionId) { return nil, false } return o.QuestionId, true } // HasQuestionId returns a boolean if a field has been set. func (o *SchemaAnswerUpdateReq) HasQuestionId() bool { if o != nil && !IsNil(o.QuestionId) { return true } return false } // SetQuestionId gets a reference to the given string and assigns it to the QuestionId field. func (o *SchemaAnswerUpdateReq) SetQuestionId(v string) { o.QuestionId = &v } // GetTitle returns the Title field value if set, zero value otherwise. func (o *SchemaAnswerUpdateReq) GetTitle() string { if o == nil || IsNil(o.Title) { var ret string return ret } return *o.Title } // GetTitleOk returns a tuple with the Title field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SchemaAnswerUpdateReq) GetTitleOk() (*string, bool) { if o == nil || IsNil(o.Title) { return nil, false } return o.Title, true } // HasTitle returns a boolean if a field has been set. func (o *SchemaAnswerUpdateReq) HasTitle() bool { if o != nil && !IsNil(o.Title) { return true } return false } // SetTitle gets a reference to the given string and assigns it to the Title field. func (o *SchemaAnswerUpdateReq) SetTitle(v string) { o.Title = &v } func (o SchemaAnswerUpdateReq) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } return json.Marshal(toSerialize) } func (o SchemaAnswerUpdateReq) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} 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.EditSummary) { toSerialize["edit_summary"] = o.EditSummary } if !IsNil(o.Id) { toSerialize["id"] = o.Id } if !IsNil(o.QuestionId) { toSerialize["question_id"] = o.QuestionId } if !IsNil(o.Title) { toSerialize["title"] = o.Title } return toSerialize, nil } type NullableSchemaAnswerUpdateReq struct { value *SchemaAnswerUpdateReq isSet bool } func (v NullableSchemaAnswerUpdateReq) Get() *SchemaAnswerUpdateReq { return v.value } func (v *NullableSchemaAnswerUpdateReq) Set(val *SchemaAnswerUpdateReq) { v.value = val v.isSet = true } func (v NullableSchemaAnswerUpdateReq) IsSet() bool { return v.isSet } func (v *NullableSchemaAnswerUpdateReq) Unset() { v.value = nil v.isSet = false } func NewNullableSchemaAnswerUpdateReq(val *SchemaAnswerUpdateReq) *NullableSchemaAnswerUpdateReq { return &NullableSchemaAnswerUpdateReq{value: val, isSet: true} } func (v NullableSchemaAnswerUpdateReq) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableSchemaAnswerUpdateReq) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }