152 lines
4.0 KiB
Go
152 lines
4.0 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 SchemaAcceptAnswerReq type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SchemaAcceptAnswerReq{}
|
|
|
|
// SchemaAcceptAnswerReq struct for SchemaAcceptAnswerReq
|
|
type SchemaAcceptAnswerReq struct {
|
|
AnswerId *string `json:"answer_id,omitempty"`
|
|
QuestionId string `json:"question_id"`
|
|
}
|
|
|
|
// NewSchemaAcceptAnswerReq instantiates a new SchemaAcceptAnswerReq 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 NewSchemaAcceptAnswerReq(questionId string) *SchemaAcceptAnswerReq {
|
|
this := SchemaAcceptAnswerReq{}
|
|
this.QuestionId = questionId
|
|
return &this
|
|
}
|
|
|
|
// NewSchemaAcceptAnswerReqWithDefaults instantiates a new SchemaAcceptAnswerReq 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 NewSchemaAcceptAnswerReqWithDefaults() *SchemaAcceptAnswerReq {
|
|
this := SchemaAcceptAnswerReq{}
|
|
return &this
|
|
}
|
|
|
|
// GetAnswerId returns the AnswerId field value if set, zero value otherwise.
|
|
func (o *SchemaAcceptAnswerReq) GetAnswerId() string {
|
|
if o == nil || IsNil(o.AnswerId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.AnswerId
|
|
}
|
|
|
|
// GetAnswerIdOk returns a tuple with the AnswerId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaAcceptAnswerReq) GetAnswerIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.AnswerId) {
|
|
return nil, false
|
|
}
|
|
return o.AnswerId, true
|
|
}
|
|
|
|
// HasAnswerId returns a boolean if a field has been set.
|
|
func (o *SchemaAcceptAnswerReq) HasAnswerId() bool {
|
|
if o != nil && !IsNil(o.AnswerId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAnswerId gets a reference to the given string and assigns it to the AnswerId field.
|
|
func (o *SchemaAcceptAnswerReq) SetAnswerId(v string) {
|
|
o.AnswerId = &v
|
|
}
|
|
|
|
// GetQuestionId returns the QuestionId field value
|
|
func (o *SchemaAcceptAnswerReq) GetQuestionId() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.QuestionId
|
|
}
|
|
|
|
// GetQuestionIdOk returns a tuple with the QuestionId field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaAcceptAnswerReq) GetQuestionIdOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.QuestionId, true
|
|
}
|
|
|
|
// SetQuestionId sets field value
|
|
func (o *SchemaAcceptAnswerReq) SetQuestionId(v string) {
|
|
o.QuestionId = v
|
|
}
|
|
|
|
func (o SchemaAcceptAnswerReq) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o SchemaAcceptAnswerReq) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.AnswerId) {
|
|
toSerialize["answer_id"] = o.AnswerId
|
|
}
|
|
toSerialize["question_id"] = o.QuestionId
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableSchemaAcceptAnswerReq struct {
|
|
value *SchemaAcceptAnswerReq
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSchemaAcceptAnswerReq) Get() *SchemaAcceptAnswerReq {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSchemaAcceptAnswerReq) Set(val *SchemaAcceptAnswerReq) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSchemaAcceptAnswerReq) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSchemaAcceptAnswerReq) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSchemaAcceptAnswerReq(val *SchemaAcceptAnswerReq) *NullableSchemaAcceptAnswerReq {
|
|
return &NullableSchemaAcceptAnswerReq{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSchemaAcceptAnswerReq) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSchemaAcceptAnswerReq) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|