first version
This commit is contained in:
174
model_schema_question_add.go
Normal file
174
model_schema_question_add.go
Normal file
@@ -0,0 +1,174 @@
|
||||
/*
|
||||
answer
|
||||
|
||||
answer api
|
||||
|
||||
API version: v0.0.1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package openapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the SchemaQuestionAdd type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &SchemaQuestionAdd{}
|
||||
|
||||
// SchemaQuestionAdd struct for SchemaQuestionAdd
|
||||
type SchemaQuestionAdd struct {
|
||||
// content
|
||||
Content string `json:"content"`
|
||||
// tags
|
||||
Tags []SchemaTagItem `json:"tags"`
|
||||
// question title
|
||||
Title string `json:"title"`
|
||||
}
|
||||
|
||||
// NewSchemaQuestionAdd instantiates a new SchemaQuestionAdd 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 NewSchemaQuestionAdd(content string, tags []SchemaTagItem, title string) *SchemaQuestionAdd {
|
||||
this := SchemaQuestionAdd{}
|
||||
this.Content = content
|
||||
this.Tags = tags
|
||||
this.Title = title
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewSchemaQuestionAddWithDefaults instantiates a new SchemaQuestionAdd 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 NewSchemaQuestionAddWithDefaults() *SchemaQuestionAdd {
|
||||
this := SchemaQuestionAdd{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetContent returns the Content field value
|
||||
func (o *SchemaQuestionAdd) 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 *SchemaQuestionAdd) GetContentOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Content, true
|
||||
}
|
||||
|
||||
// SetContent sets field value
|
||||
func (o *SchemaQuestionAdd) SetContent(v string) {
|
||||
o.Content = v
|
||||
}
|
||||
|
||||
// GetTags returns the Tags field value
|
||||
func (o *SchemaQuestionAdd) 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 *SchemaQuestionAdd) GetTagsOk() ([]SchemaTagItem, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Tags, true
|
||||
}
|
||||
|
||||
// SetTags sets field value
|
||||
func (o *SchemaQuestionAdd) SetTags(v []SchemaTagItem) {
|
||||
o.Tags = v
|
||||
}
|
||||
|
||||
// GetTitle returns the Title field value
|
||||
func (o *SchemaQuestionAdd) 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 *SchemaQuestionAdd) GetTitleOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Title, true
|
||||
}
|
||||
|
||||
// SetTitle sets field value
|
||||
func (o *SchemaQuestionAdd) SetTitle(v string) {
|
||||
o.Title = v
|
||||
}
|
||||
|
||||
func (o SchemaQuestionAdd) MarshalJSON() ([]byte, error) {
|
||||
toSerialize,err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o SchemaQuestionAdd) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["content"] = o.Content
|
||||
toSerialize["tags"] = o.Tags
|
||||
toSerialize["title"] = o.Title
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableSchemaQuestionAdd struct {
|
||||
value *SchemaQuestionAdd
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableSchemaQuestionAdd) Get() *SchemaQuestionAdd {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableSchemaQuestionAdd) Set(val *SchemaQuestionAdd) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableSchemaQuestionAdd) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableSchemaQuestionAdd) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableSchemaQuestionAdd(val *SchemaQuestionAdd) *NullableSchemaQuestionAdd {
|
||||
return &NullableSchemaQuestionAdd{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableSchemaQuestionAdd) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableSchemaQuestionAdd) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user