224 lines
5.9 KiB
Go
224 lines
5.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 SchemaAnswerAddReq type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SchemaAnswerAddReq{}
|
|
|
|
// SchemaAnswerAddReq struct for SchemaAnswerAddReq
|
|
type SchemaAnswerAddReq struct {
|
|
CaptchaCode *string `json:"captcha_code,omitempty"`
|
|
CaptchaId *string `json:"captcha_id,omitempty"`
|
|
Content string `json:"content"`
|
|
QuestionId *string `json:"question_id,omitempty"`
|
|
}
|
|
|
|
// NewSchemaAnswerAddReq instantiates a new SchemaAnswerAddReq 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 NewSchemaAnswerAddReq(content string) *SchemaAnswerAddReq {
|
|
this := SchemaAnswerAddReq{}
|
|
this.Content = content
|
|
return &this
|
|
}
|
|
|
|
// NewSchemaAnswerAddReqWithDefaults instantiates a new SchemaAnswerAddReq 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 NewSchemaAnswerAddReqWithDefaults() *SchemaAnswerAddReq {
|
|
this := SchemaAnswerAddReq{}
|
|
return &this
|
|
}
|
|
|
|
// GetCaptchaCode returns the CaptchaCode field value if set, zero value otherwise.
|
|
func (o *SchemaAnswerAddReq) 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 *SchemaAnswerAddReq) 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 *SchemaAnswerAddReq) 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 *SchemaAnswerAddReq) SetCaptchaCode(v string) {
|
|
o.CaptchaCode = &v
|
|
}
|
|
|
|
// GetCaptchaId returns the CaptchaId field value if set, zero value otherwise.
|
|
func (o *SchemaAnswerAddReq) 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 *SchemaAnswerAddReq) 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 *SchemaAnswerAddReq) 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 *SchemaAnswerAddReq) SetCaptchaId(v string) {
|
|
o.CaptchaId = &v
|
|
}
|
|
|
|
// GetContent returns the Content field value
|
|
func (o *SchemaAnswerAddReq) 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 *SchemaAnswerAddReq) GetContentOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Content, true
|
|
}
|
|
|
|
// SetContent sets field value
|
|
func (o *SchemaAnswerAddReq) SetContent(v string) {
|
|
o.Content = v
|
|
}
|
|
|
|
// GetQuestionId returns the QuestionId field value if set, zero value otherwise.
|
|
func (o *SchemaAnswerAddReq) 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 *SchemaAnswerAddReq) 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 *SchemaAnswerAddReq) 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 *SchemaAnswerAddReq) SetQuestionId(v string) {
|
|
o.QuestionId = &v
|
|
}
|
|
|
|
func (o SchemaAnswerAddReq) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o SchemaAnswerAddReq) 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.QuestionId) {
|
|
toSerialize["question_id"] = o.QuestionId
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableSchemaAnswerAddReq struct {
|
|
value *SchemaAnswerAddReq
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSchemaAnswerAddReq) Get() *SchemaAnswerAddReq {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSchemaAnswerAddReq) Set(val *SchemaAnswerAddReq) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSchemaAnswerAddReq) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSchemaAnswerAddReq) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSchemaAnswerAddReq(val *SchemaAnswerAddReq) *NullableSchemaAnswerAddReq {
|
|
return &NullableSchemaAnswerAddReq{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSchemaAnswerAddReq) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSchemaAnswerAddReq) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|