Files
openapi-go-answer/model_schema_follow_resp.go
2023-09-26 16:20:01 +08:00

163 lines
4.2 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 SchemaFollowResp type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SchemaFollowResp{}
// SchemaFollowResp struct for SchemaFollowResp
type SchemaFollowResp struct {
// the followers of object
Follows *int32 `json:"follows,omitempty"`
// if user is followed object will be true,otherwise false
IsFollowed *bool `json:"is_followed,omitempty"`
}
// NewSchemaFollowResp instantiates a new SchemaFollowResp 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 NewSchemaFollowResp() *SchemaFollowResp {
this := SchemaFollowResp{}
return &this
}
// NewSchemaFollowRespWithDefaults instantiates a new SchemaFollowResp 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 NewSchemaFollowRespWithDefaults() *SchemaFollowResp {
this := SchemaFollowResp{}
return &this
}
// GetFollows returns the Follows field value if set, zero value otherwise.
func (o *SchemaFollowResp) GetFollows() int32 {
if o == nil || IsNil(o.Follows) {
var ret int32
return ret
}
return *o.Follows
}
// GetFollowsOk returns a tuple with the Follows field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaFollowResp) GetFollowsOk() (*int32, bool) {
if o == nil || IsNil(o.Follows) {
return nil, false
}
return o.Follows, true
}
// HasFollows returns a boolean if a field has been set.
func (o *SchemaFollowResp) HasFollows() bool {
if o != nil && !IsNil(o.Follows) {
return true
}
return false
}
// SetFollows gets a reference to the given int32 and assigns it to the Follows field.
func (o *SchemaFollowResp) SetFollows(v int32) {
o.Follows = &v
}
// GetIsFollowed returns the IsFollowed field value if set, zero value otherwise.
func (o *SchemaFollowResp) GetIsFollowed() bool {
if o == nil || IsNil(o.IsFollowed) {
var ret bool
return ret
}
return *o.IsFollowed
}
// GetIsFollowedOk returns a tuple with the IsFollowed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SchemaFollowResp) GetIsFollowedOk() (*bool, bool) {
if o == nil || IsNil(o.IsFollowed) {
return nil, false
}
return o.IsFollowed, true
}
// HasIsFollowed returns a boolean if a field has been set.
func (o *SchemaFollowResp) HasIsFollowed() bool {
if o != nil && !IsNil(o.IsFollowed) {
return true
}
return false
}
// SetIsFollowed gets a reference to the given bool and assigns it to the IsFollowed field.
func (o *SchemaFollowResp) SetIsFollowed(v bool) {
o.IsFollowed = &v
}
func (o SchemaFollowResp) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SchemaFollowResp) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Follows) {
toSerialize["follows"] = o.Follows
}
if !IsNil(o.IsFollowed) {
toSerialize["is_followed"] = o.IsFollowed
}
return toSerialize, nil
}
type NullableSchemaFollowResp struct {
value *SchemaFollowResp
isSet bool
}
func (v NullableSchemaFollowResp) Get() *SchemaFollowResp {
return v.value
}
func (v *NullableSchemaFollowResp) Set(val *SchemaFollowResp) {
v.value = val
v.isSet = true
}
func (v NullableSchemaFollowResp) IsSet() bool {
return v.isSet
}
func (v *NullableSchemaFollowResp) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSchemaFollowResp(val *SchemaFollowResp) *NullableSchemaFollowResp {
return &NullableSchemaFollowResp{value: val, isSet: true}
}
func (v NullableSchemaFollowResp) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSchemaFollowResp) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}