first version
This commit is contained in:
239
model_schema_question_update.go
Normal file
239
model_schema_question_update.go
Normal file
@@ -0,0 +1,239 @@
|
||||
/*
|
||||
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 SchemaQuestionUpdate type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &SchemaQuestionUpdate{}
|
||||
|
||||
// SchemaQuestionUpdate struct for SchemaQuestionUpdate
|
||||
type SchemaQuestionUpdate struct {
|
||||
// content
|
||||
Content string `json:"content"`
|
||||
// edit summary
|
||||
EditSummary *string `json:"edit_summary,omitempty"`
|
||||
// question id
|
||||
Id string `json:"id"`
|
||||
// tags
|
||||
Tags []SchemaTagItem `json:"tags"`
|
||||
// question title
|
||||
Title string `json:"title"`
|
||||
}
|
||||
|
||||
// NewSchemaQuestionUpdate instantiates a new SchemaQuestionUpdate 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 NewSchemaQuestionUpdate(content string, id string, tags []SchemaTagItem, title string) *SchemaQuestionUpdate {
|
||||
this := SchemaQuestionUpdate{}
|
||||
this.Content = content
|
||||
this.Id = id
|
||||
this.Tags = tags
|
||||
this.Title = title
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewSchemaQuestionUpdateWithDefaults instantiates a new SchemaQuestionUpdate 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 NewSchemaQuestionUpdateWithDefaults() *SchemaQuestionUpdate {
|
||||
this := SchemaQuestionUpdate{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetContent returns the Content field value
|
||||
func (o *SchemaQuestionUpdate) 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 *SchemaQuestionUpdate) GetContentOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Content, true
|
||||
}
|
||||
|
||||
// SetContent sets field value
|
||||
func (o *SchemaQuestionUpdate) SetContent(v string) {
|
||||
o.Content = v
|
||||
}
|
||||
|
||||
// GetEditSummary returns the EditSummary field value if set, zero value otherwise.
|
||||
func (o *SchemaQuestionUpdate) 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 *SchemaQuestionUpdate) 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 *SchemaQuestionUpdate) 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 *SchemaQuestionUpdate) SetEditSummary(v string) {
|
||||
o.EditSummary = &v
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *SchemaQuestionUpdate) GetId() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Id
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaQuestionUpdate) GetIdOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Id, true
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *SchemaQuestionUpdate) SetId(v string) {
|
||||
o.Id = v
|
||||
}
|
||||
|
||||
// GetTags returns the Tags field value
|
||||
func (o *SchemaQuestionUpdate) 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 *SchemaQuestionUpdate) GetTagsOk() ([]SchemaTagItem, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Tags, true
|
||||
}
|
||||
|
||||
// SetTags sets field value
|
||||
func (o *SchemaQuestionUpdate) SetTags(v []SchemaTagItem) {
|
||||
o.Tags = v
|
||||
}
|
||||
|
||||
// GetTitle returns the Title field value
|
||||
func (o *SchemaQuestionUpdate) 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 *SchemaQuestionUpdate) GetTitleOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Title, true
|
||||
}
|
||||
|
||||
// SetTitle sets field value
|
||||
func (o *SchemaQuestionUpdate) SetTitle(v string) {
|
||||
o.Title = v
|
||||
}
|
||||
|
||||
func (o SchemaQuestionUpdate) MarshalJSON() ([]byte, error) {
|
||||
toSerialize,err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o SchemaQuestionUpdate) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
toSerialize["content"] = o.Content
|
||||
if !IsNil(o.EditSummary) {
|
||||
toSerialize["edit_summary"] = o.EditSummary
|
||||
}
|
||||
toSerialize["id"] = o.Id
|
||||
toSerialize["tags"] = o.Tags
|
||||
toSerialize["title"] = o.Title
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableSchemaQuestionUpdate struct {
|
||||
value *SchemaQuestionUpdate
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableSchemaQuestionUpdate) Get() *SchemaQuestionUpdate {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableSchemaQuestionUpdate) Set(val *SchemaQuestionUpdate) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableSchemaQuestionUpdate) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableSchemaQuestionUpdate) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableSchemaQuestionUpdate(val *SchemaQuestionUpdate) *NullableSchemaQuestionUpdate {
|
||||
return &NullableSchemaQuestionUpdate{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableSchemaQuestionUpdate) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableSchemaQuestionUpdate) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user