/* 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 SchemaSearchObject type satisfies the MappedNullable interface at compile time var _ MappedNullable = &SchemaSearchObject{} // SchemaSearchObject struct for SchemaSearchObject type SchemaSearchObject struct { Accepted *bool `json:"accepted,omitempty"` AnswerCount *int32 `json:"answer_count,omitempty"` CreatedAt *int32 `json:"created_at,omitempty"` Excerpt *string `json:"excerpt,omitempty"` Id *string `json:"id,omitempty"` QuestionId *string `json:"question_id,omitempty"` // Status Status *string `json:"status,omitempty"` // tags Tags []SchemaTagResp `json:"tags,omitempty"` Title *string `json:"title,omitempty"` UserInfo *SchemaSearchObjectUserInfo `json:"user_info,omitempty"` VoteCount *int32 `json:"vote_count,omitempty"` } // NewSchemaSearchObject instantiates a new SchemaSearchObject 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 NewSchemaSearchObject() *SchemaSearchObject { this := SchemaSearchObject{} return &this } // NewSchemaSearchObjectWithDefaults instantiates a new SchemaSearchObject 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 NewSchemaSearchObjectWithDefaults() *SchemaSearchObject { this := SchemaSearchObject{} return &this } // GetAccepted returns the Accepted field value if set, zero value otherwise. func (o *SchemaSearchObject) GetAccepted() bool { if o == nil || IsNil(o.Accepted) { var ret bool return ret } return *o.Accepted } // GetAcceptedOk returns a tuple with the Accepted field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SchemaSearchObject) GetAcceptedOk() (*bool, bool) { if o == nil || IsNil(o.Accepted) { return nil, false } return o.Accepted, true } // HasAccepted returns a boolean if a field has been set. func (o *SchemaSearchObject) HasAccepted() bool { if o != nil && !IsNil(o.Accepted) { return true } return false } // SetAccepted gets a reference to the given bool and assigns it to the Accepted field. func (o *SchemaSearchObject) SetAccepted(v bool) { o.Accepted = &v } // GetAnswerCount returns the AnswerCount field value if set, zero value otherwise. func (o *SchemaSearchObject) GetAnswerCount() int32 { if o == nil || IsNil(o.AnswerCount) { var ret int32 return ret } return *o.AnswerCount } // GetAnswerCountOk returns a tuple with the AnswerCount field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SchemaSearchObject) GetAnswerCountOk() (*int32, bool) { if o == nil || IsNil(o.AnswerCount) { return nil, false } return o.AnswerCount, true } // HasAnswerCount returns a boolean if a field has been set. func (o *SchemaSearchObject) HasAnswerCount() bool { if o != nil && !IsNil(o.AnswerCount) { return true } return false } // SetAnswerCount gets a reference to the given int32 and assigns it to the AnswerCount field. func (o *SchemaSearchObject) SetAnswerCount(v int32) { o.AnswerCount = &v } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. func (o *SchemaSearchObject) GetCreatedAt() int32 { if o == nil || IsNil(o.CreatedAt) { var ret int32 return ret } return *o.CreatedAt } // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SchemaSearchObject) GetCreatedAtOk() (*int32, bool) { if o == nil || IsNil(o.CreatedAt) { return nil, false } return o.CreatedAt, true } // HasCreatedAt returns a boolean if a field has been set. func (o *SchemaSearchObject) HasCreatedAt() bool { if o != nil && !IsNil(o.CreatedAt) { return true } return false } // SetCreatedAt gets a reference to the given int32 and assigns it to the CreatedAt field. func (o *SchemaSearchObject) SetCreatedAt(v int32) { o.CreatedAt = &v } // GetExcerpt returns the Excerpt field value if set, zero value otherwise. func (o *SchemaSearchObject) GetExcerpt() string { if o == nil || IsNil(o.Excerpt) { var ret string return ret } return *o.Excerpt } // GetExcerptOk returns a tuple with the Excerpt field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SchemaSearchObject) GetExcerptOk() (*string, bool) { if o == nil || IsNil(o.Excerpt) { return nil, false } return o.Excerpt, true } // HasExcerpt returns a boolean if a field has been set. func (o *SchemaSearchObject) HasExcerpt() bool { if o != nil && !IsNil(o.Excerpt) { return true } return false } // SetExcerpt gets a reference to the given string and assigns it to the Excerpt field. func (o *SchemaSearchObject) SetExcerpt(v string) { o.Excerpt = &v } // GetId returns the Id field value if set, zero value otherwise. func (o *SchemaSearchObject) 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 *SchemaSearchObject) 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 *SchemaSearchObject) 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 *SchemaSearchObject) SetId(v string) { o.Id = &v } // GetQuestionId returns the QuestionId field value if set, zero value otherwise. func (o *SchemaSearchObject) 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 *SchemaSearchObject) 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 *SchemaSearchObject) 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 *SchemaSearchObject) SetQuestionId(v string) { o.QuestionId = &v } // GetStatus returns the Status field value if set, zero value otherwise. func (o *SchemaSearchObject) GetStatus() string { if o == nil || IsNil(o.Status) { var ret string return ret } return *o.Status } // GetStatusOk returns a tuple with the Status field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SchemaSearchObject) GetStatusOk() (*string, bool) { if o == nil || IsNil(o.Status) { return nil, false } return o.Status, true } // HasStatus returns a boolean if a field has been set. func (o *SchemaSearchObject) HasStatus() bool { if o != nil && !IsNil(o.Status) { return true } return false } // SetStatus gets a reference to the given string and assigns it to the Status field. func (o *SchemaSearchObject) SetStatus(v string) { o.Status = &v } // GetTags returns the Tags field value if set, zero value otherwise. func (o *SchemaSearchObject) GetTags() []SchemaTagResp { if o == nil || IsNil(o.Tags) { var ret []SchemaTagResp return ret } return o.Tags } // GetTagsOk returns a tuple with the Tags field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SchemaSearchObject) GetTagsOk() ([]SchemaTagResp, bool) { if o == nil || IsNil(o.Tags) { return nil, false } return o.Tags, true } // HasTags returns a boolean if a field has been set. func (o *SchemaSearchObject) HasTags() bool { if o != nil && !IsNil(o.Tags) { return true } return false } // SetTags gets a reference to the given []SchemaTagResp and assigns it to the Tags field. func (o *SchemaSearchObject) SetTags(v []SchemaTagResp) { o.Tags = v } // GetTitle returns the Title field value if set, zero value otherwise. func (o *SchemaSearchObject) 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 *SchemaSearchObject) 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 *SchemaSearchObject) 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 *SchemaSearchObject) SetTitle(v string) { o.Title = &v } // GetUserInfo returns the UserInfo field value if set, zero value otherwise. func (o *SchemaSearchObject) GetUserInfo() SchemaSearchObjectUserInfo { if o == nil || IsNil(o.UserInfo) { var ret SchemaSearchObjectUserInfo return ret } return *o.UserInfo } // GetUserInfoOk returns a tuple with the UserInfo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SchemaSearchObject) GetUserInfoOk() (*SchemaSearchObjectUserInfo, bool) { if o == nil || IsNil(o.UserInfo) { return nil, false } return o.UserInfo, true } // HasUserInfo returns a boolean if a field has been set. func (o *SchemaSearchObject) HasUserInfo() bool { if o != nil && !IsNil(o.UserInfo) { return true } return false } // SetUserInfo gets a reference to the given SchemaSearchObjectUserInfo and assigns it to the UserInfo field. func (o *SchemaSearchObject) SetUserInfo(v SchemaSearchObjectUserInfo) { o.UserInfo = &v } // GetVoteCount returns the VoteCount field value if set, zero value otherwise. func (o *SchemaSearchObject) GetVoteCount() int32 { if o == nil || IsNil(o.VoteCount) { var ret int32 return ret } return *o.VoteCount } // GetVoteCountOk returns a tuple with the VoteCount field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SchemaSearchObject) GetVoteCountOk() (*int32, bool) { if o == nil || IsNil(o.VoteCount) { return nil, false } return o.VoteCount, true } // HasVoteCount returns a boolean if a field has been set. func (o *SchemaSearchObject) HasVoteCount() bool { if o != nil && !IsNil(o.VoteCount) { return true } return false } // SetVoteCount gets a reference to the given int32 and assigns it to the VoteCount field. func (o *SchemaSearchObject) SetVoteCount(v int32) { o.VoteCount = &v } func (o SchemaSearchObject) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } return json.Marshal(toSerialize) } func (o SchemaSearchObject) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !IsNil(o.Accepted) { toSerialize["accepted"] = o.Accepted } if !IsNil(o.AnswerCount) { toSerialize["answer_count"] = o.AnswerCount } if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } if !IsNil(o.Excerpt) { toSerialize["excerpt"] = o.Excerpt } if !IsNil(o.Id) { toSerialize["id"] = o.Id } if !IsNil(o.QuestionId) { toSerialize["question_id"] = o.QuestionId } if !IsNil(o.Status) { toSerialize["status"] = o.Status } if !IsNil(o.Tags) { toSerialize["tags"] = o.Tags } if !IsNil(o.Title) { toSerialize["title"] = o.Title } if !IsNil(o.UserInfo) { toSerialize["user_info"] = o.UserInfo } if !IsNil(o.VoteCount) { toSerialize["vote_count"] = o.VoteCount } return toSerialize, nil } type NullableSchemaSearchObject struct { value *SchemaSearchObject isSet bool } func (v NullableSchemaSearchObject) Get() *SchemaSearchObject { return v.value } func (v *NullableSchemaSearchObject) Set(val *SchemaSearchObject) { v.value = val v.isSet = true } func (v NullableSchemaSearchObject) IsSet() bool { return v.isSet } func (v *NullableSchemaSearchObject) Unset() { v.value = nil v.isSet = false } func NewNullableSchemaSearchObject(val *SchemaSearchObject) *NullableSchemaSearchObject { return &NullableSchemaSearchObject{value: val, isSet: true} } func (v NullableSchemaSearchObject) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableSchemaSearchObject) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }