first version
This commit is contained in:
423
model_schema_get_vote_with_page_resp.go
Normal file
423
model_schema_get_vote_with_page_resp.go
Normal file
@@ -0,0 +1,423 @@
|
||||
/*
|
||||
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 SchemaGetVoteWithPageResp type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &SchemaGetVoteWithPageResp{}
|
||||
|
||||
// SchemaGetVoteWithPageResp struct for SchemaGetVoteWithPageResp
|
||||
type SchemaGetVoteWithPageResp struct {
|
||||
// answer id
|
||||
AnswerId *string `json:"answer_id,omitempty"`
|
||||
// content
|
||||
Content *string `json:"content,omitempty"`
|
||||
// create time
|
||||
CreatedAt *int32 `json:"created_at,omitempty"`
|
||||
// object id
|
||||
ObjectId *string `json:"object_id,omitempty"`
|
||||
// object type
|
||||
ObjectType *string `json:"object_type,omitempty"`
|
||||
// question id
|
||||
QuestionId *string `json:"question_id,omitempty"`
|
||||
// title
|
||||
Title *string `json:"title,omitempty"`
|
||||
// url title
|
||||
UrlTitle *string `json:"url_title,omitempty"`
|
||||
// vote type
|
||||
VoteType *string `json:"vote_type,omitempty"`
|
||||
}
|
||||
|
||||
// NewSchemaGetVoteWithPageResp instantiates a new SchemaGetVoteWithPageResp 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 NewSchemaGetVoteWithPageResp() *SchemaGetVoteWithPageResp {
|
||||
this := SchemaGetVoteWithPageResp{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewSchemaGetVoteWithPageRespWithDefaults instantiates a new SchemaGetVoteWithPageResp 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 NewSchemaGetVoteWithPageRespWithDefaults() *SchemaGetVoteWithPageResp {
|
||||
this := SchemaGetVoteWithPageResp{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAnswerId returns the AnswerId field value if set, zero value otherwise.
|
||||
func (o *SchemaGetVoteWithPageResp) 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 *SchemaGetVoteWithPageResp) 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 *SchemaGetVoteWithPageResp) 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 *SchemaGetVoteWithPageResp) SetAnswerId(v string) {
|
||||
o.AnswerId = &v
|
||||
}
|
||||
|
||||
// GetContent returns the Content field value if set, zero value otherwise.
|
||||
func (o *SchemaGetVoteWithPageResp) GetContent() string {
|
||||
if o == nil || IsNil(o.Content) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Content
|
||||
}
|
||||
|
||||
// GetContentOk returns a tuple with the Content field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaGetVoteWithPageResp) GetContentOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Content) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Content, true
|
||||
}
|
||||
|
||||
// HasContent returns a boolean if a field has been set.
|
||||
func (o *SchemaGetVoteWithPageResp) HasContent() bool {
|
||||
if o != nil && !IsNil(o.Content) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetContent gets a reference to the given string and assigns it to the Content field.
|
||||
func (o *SchemaGetVoteWithPageResp) SetContent(v string) {
|
||||
o.Content = &v
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *SchemaGetVoteWithPageResp) 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 *SchemaGetVoteWithPageResp) 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 *SchemaGetVoteWithPageResp) 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 *SchemaGetVoteWithPageResp) SetCreatedAt(v int32) {
|
||||
o.CreatedAt = &v
|
||||
}
|
||||
|
||||
// GetObjectId returns the ObjectId field value if set, zero value otherwise.
|
||||
func (o *SchemaGetVoteWithPageResp) GetObjectId() string {
|
||||
if o == nil || IsNil(o.ObjectId) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.ObjectId
|
||||
}
|
||||
|
||||
// GetObjectIdOk returns a tuple with the ObjectId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaGetVoteWithPageResp) GetObjectIdOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.ObjectId) {
|
||||
return nil, false
|
||||
}
|
||||
return o.ObjectId, true
|
||||
}
|
||||
|
||||
// HasObjectId returns a boolean if a field has been set.
|
||||
func (o *SchemaGetVoteWithPageResp) HasObjectId() bool {
|
||||
if o != nil && !IsNil(o.ObjectId) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetObjectId gets a reference to the given string and assigns it to the ObjectId field.
|
||||
func (o *SchemaGetVoteWithPageResp) SetObjectId(v string) {
|
||||
o.ObjectId = &v
|
||||
}
|
||||
|
||||
// GetObjectType returns the ObjectType field value if set, zero value otherwise.
|
||||
func (o *SchemaGetVoteWithPageResp) GetObjectType() string {
|
||||
if o == nil || IsNil(o.ObjectType) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.ObjectType
|
||||
}
|
||||
|
||||
// GetObjectTypeOk returns a tuple with the ObjectType field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaGetVoteWithPageResp) GetObjectTypeOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.ObjectType) {
|
||||
return nil, false
|
||||
}
|
||||
return o.ObjectType, true
|
||||
}
|
||||
|
||||
// HasObjectType returns a boolean if a field has been set.
|
||||
func (o *SchemaGetVoteWithPageResp) HasObjectType() bool {
|
||||
if o != nil && !IsNil(o.ObjectType) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetObjectType gets a reference to the given string and assigns it to the ObjectType field.
|
||||
func (o *SchemaGetVoteWithPageResp) SetObjectType(v string) {
|
||||
o.ObjectType = &v
|
||||
}
|
||||
|
||||
// GetQuestionId returns the QuestionId field value if set, zero value otherwise.
|
||||
func (o *SchemaGetVoteWithPageResp) 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 *SchemaGetVoteWithPageResp) 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 *SchemaGetVoteWithPageResp) 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 *SchemaGetVoteWithPageResp) SetQuestionId(v string) {
|
||||
o.QuestionId = &v
|
||||
}
|
||||
|
||||
// GetTitle returns the Title field value if set, zero value otherwise.
|
||||
func (o *SchemaGetVoteWithPageResp) 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 *SchemaGetVoteWithPageResp) 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 *SchemaGetVoteWithPageResp) 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 *SchemaGetVoteWithPageResp) SetTitle(v string) {
|
||||
o.Title = &v
|
||||
}
|
||||
|
||||
// GetUrlTitle returns the UrlTitle field value if set, zero value otherwise.
|
||||
func (o *SchemaGetVoteWithPageResp) GetUrlTitle() string {
|
||||
if o == nil || IsNil(o.UrlTitle) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.UrlTitle
|
||||
}
|
||||
|
||||
// GetUrlTitleOk returns a tuple with the UrlTitle field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaGetVoteWithPageResp) GetUrlTitleOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.UrlTitle) {
|
||||
return nil, false
|
||||
}
|
||||
return o.UrlTitle, true
|
||||
}
|
||||
|
||||
// HasUrlTitle returns a boolean if a field has been set.
|
||||
func (o *SchemaGetVoteWithPageResp) HasUrlTitle() bool {
|
||||
if o != nil && !IsNil(o.UrlTitle) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUrlTitle gets a reference to the given string and assigns it to the UrlTitle field.
|
||||
func (o *SchemaGetVoteWithPageResp) SetUrlTitle(v string) {
|
||||
o.UrlTitle = &v
|
||||
}
|
||||
|
||||
// GetVoteType returns the VoteType field value if set, zero value otherwise.
|
||||
func (o *SchemaGetVoteWithPageResp) GetVoteType() string {
|
||||
if o == nil || IsNil(o.VoteType) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.VoteType
|
||||
}
|
||||
|
||||
// GetVoteTypeOk returns a tuple with the VoteType field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaGetVoteWithPageResp) GetVoteTypeOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.VoteType) {
|
||||
return nil, false
|
||||
}
|
||||
return o.VoteType, true
|
||||
}
|
||||
|
||||
// HasVoteType returns a boolean if a field has been set.
|
||||
func (o *SchemaGetVoteWithPageResp) HasVoteType() bool {
|
||||
if o != nil && !IsNil(o.VoteType) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetVoteType gets a reference to the given string and assigns it to the VoteType field.
|
||||
func (o *SchemaGetVoteWithPageResp) SetVoteType(v string) {
|
||||
o.VoteType = &v
|
||||
}
|
||||
|
||||
func (o SchemaGetVoteWithPageResp) MarshalJSON() ([]byte, error) {
|
||||
toSerialize,err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o SchemaGetVoteWithPageResp) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.AnswerId) {
|
||||
toSerialize["answer_id"] = o.AnswerId
|
||||
}
|
||||
if !IsNil(o.Content) {
|
||||
toSerialize["content"] = o.Content
|
||||
}
|
||||
if !IsNil(o.CreatedAt) {
|
||||
toSerialize["created_at"] = o.CreatedAt
|
||||
}
|
||||
if !IsNil(o.ObjectId) {
|
||||
toSerialize["object_id"] = o.ObjectId
|
||||
}
|
||||
if !IsNil(o.ObjectType) {
|
||||
toSerialize["object_type"] = o.ObjectType
|
||||
}
|
||||
if !IsNil(o.QuestionId) {
|
||||
toSerialize["question_id"] = o.QuestionId
|
||||
}
|
||||
if !IsNil(o.Title) {
|
||||
toSerialize["title"] = o.Title
|
||||
}
|
||||
if !IsNil(o.UrlTitle) {
|
||||
toSerialize["url_title"] = o.UrlTitle
|
||||
}
|
||||
if !IsNil(o.VoteType) {
|
||||
toSerialize["vote_type"] = o.VoteType
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableSchemaGetVoteWithPageResp struct {
|
||||
value *SchemaGetVoteWithPageResp
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableSchemaGetVoteWithPageResp) Get() *SchemaGetVoteWithPageResp {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableSchemaGetVoteWithPageResp) Set(val *SchemaGetVoteWithPageResp) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableSchemaGetVoteWithPageResp) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableSchemaGetVoteWithPageResp) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableSchemaGetVoteWithPageResp(val *SchemaGetVoteWithPageResp) *NullableSchemaGetVoteWithPageResp {
|
||||
return &NullableSchemaGetVoteWithPageResp{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableSchemaGetVoteWithPageResp) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableSchemaGetVoteWithPageResp) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user