first version
This commit is contained in:
198
model_schema_user_ranking_resp.go
Normal file
198
model_schema_user_ranking_resp.go
Normal file
@@ -0,0 +1,198 @@
|
||||
/*
|
||||
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 SchemaUserRankingResp type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &SchemaUserRankingResp{}
|
||||
|
||||
// SchemaUserRankingResp struct for SchemaUserRankingResp
|
||||
type SchemaUserRankingResp struct {
|
||||
Staffs []SchemaUserRankingSimpleInfo `json:"staffs,omitempty"`
|
||||
UsersWithTheMostReputation []SchemaUserRankingSimpleInfo `json:"users_with_the_most_reputation,omitempty"`
|
||||
UsersWithTheMostVote []SchemaUserRankingSimpleInfo `json:"users_with_the_most_vote,omitempty"`
|
||||
}
|
||||
|
||||
// NewSchemaUserRankingResp instantiates a new SchemaUserRankingResp 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 NewSchemaUserRankingResp() *SchemaUserRankingResp {
|
||||
this := SchemaUserRankingResp{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewSchemaUserRankingRespWithDefaults instantiates a new SchemaUserRankingResp 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 NewSchemaUserRankingRespWithDefaults() *SchemaUserRankingResp {
|
||||
this := SchemaUserRankingResp{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetStaffs returns the Staffs field value if set, zero value otherwise.
|
||||
func (o *SchemaUserRankingResp) GetStaffs() []SchemaUserRankingSimpleInfo {
|
||||
if o == nil || IsNil(o.Staffs) {
|
||||
var ret []SchemaUserRankingSimpleInfo
|
||||
return ret
|
||||
}
|
||||
return o.Staffs
|
||||
}
|
||||
|
||||
// GetStaffsOk returns a tuple with the Staffs field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaUserRankingResp) GetStaffsOk() ([]SchemaUserRankingSimpleInfo, bool) {
|
||||
if o == nil || IsNil(o.Staffs) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Staffs, true
|
||||
}
|
||||
|
||||
// HasStaffs returns a boolean if a field has been set.
|
||||
func (o *SchemaUserRankingResp) HasStaffs() bool {
|
||||
if o != nil && !IsNil(o.Staffs) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetStaffs gets a reference to the given []SchemaUserRankingSimpleInfo and assigns it to the Staffs field.
|
||||
func (o *SchemaUserRankingResp) SetStaffs(v []SchemaUserRankingSimpleInfo) {
|
||||
o.Staffs = v
|
||||
}
|
||||
|
||||
// GetUsersWithTheMostReputation returns the UsersWithTheMostReputation field value if set, zero value otherwise.
|
||||
func (o *SchemaUserRankingResp) GetUsersWithTheMostReputation() []SchemaUserRankingSimpleInfo {
|
||||
if o == nil || IsNil(o.UsersWithTheMostReputation) {
|
||||
var ret []SchemaUserRankingSimpleInfo
|
||||
return ret
|
||||
}
|
||||
return o.UsersWithTheMostReputation
|
||||
}
|
||||
|
||||
// GetUsersWithTheMostReputationOk returns a tuple with the UsersWithTheMostReputation field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaUserRankingResp) GetUsersWithTheMostReputationOk() ([]SchemaUserRankingSimpleInfo, bool) {
|
||||
if o == nil || IsNil(o.UsersWithTheMostReputation) {
|
||||
return nil, false
|
||||
}
|
||||
return o.UsersWithTheMostReputation, true
|
||||
}
|
||||
|
||||
// HasUsersWithTheMostReputation returns a boolean if a field has been set.
|
||||
func (o *SchemaUserRankingResp) HasUsersWithTheMostReputation() bool {
|
||||
if o != nil && !IsNil(o.UsersWithTheMostReputation) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUsersWithTheMostReputation gets a reference to the given []SchemaUserRankingSimpleInfo and assigns it to the UsersWithTheMostReputation field.
|
||||
func (o *SchemaUserRankingResp) SetUsersWithTheMostReputation(v []SchemaUserRankingSimpleInfo) {
|
||||
o.UsersWithTheMostReputation = v
|
||||
}
|
||||
|
||||
// GetUsersWithTheMostVote returns the UsersWithTheMostVote field value if set, zero value otherwise.
|
||||
func (o *SchemaUserRankingResp) GetUsersWithTheMostVote() []SchemaUserRankingSimpleInfo {
|
||||
if o == nil || IsNil(o.UsersWithTheMostVote) {
|
||||
var ret []SchemaUserRankingSimpleInfo
|
||||
return ret
|
||||
}
|
||||
return o.UsersWithTheMostVote
|
||||
}
|
||||
|
||||
// GetUsersWithTheMostVoteOk returns a tuple with the UsersWithTheMostVote field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaUserRankingResp) GetUsersWithTheMostVoteOk() ([]SchemaUserRankingSimpleInfo, bool) {
|
||||
if o == nil || IsNil(o.UsersWithTheMostVote) {
|
||||
return nil, false
|
||||
}
|
||||
return o.UsersWithTheMostVote, true
|
||||
}
|
||||
|
||||
// HasUsersWithTheMostVote returns a boolean if a field has been set.
|
||||
func (o *SchemaUserRankingResp) HasUsersWithTheMostVote() bool {
|
||||
if o != nil && !IsNil(o.UsersWithTheMostVote) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUsersWithTheMostVote gets a reference to the given []SchemaUserRankingSimpleInfo and assigns it to the UsersWithTheMostVote field.
|
||||
func (o *SchemaUserRankingResp) SetUsersWithTheMostVote(v []SchemaUserRankingSimpleInfo) {
|
||||
o.UsersWithTheMostVote = v
|
||||
}
|
||||
|
||||
func (o SchemaUserRankingResp) MarshalJSON() ([]byte, error) {
|
||||
toSerialize,err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o SchemaUserRankingResp) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Staffs) {
|
||||
toSerialize["staffs"] = o.Staffs
|
||||
}
|
||||
if !IsNil(o.UsersWithTheMostReputation) {
|
||||
toSerialize["users_with_the_most_reputation"] = o.UsersWithTheMostReputation
|
||||
}
|
||||
if !IsNil(o.UsersWithTheMostVote) {
|
||||
toSerialize["users_with_the_most_vote"] = o.UsersWithTheMostVote
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableSchemaUserRankingResp struct {
|
||||
value *SchemaUserRankingResp
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableSchemaUserRankingResp) Get() *SchemaUserRankingResp {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableSchemaUserRankingResp) Set(val *SchemaUserRankingResp) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableSchemaUserRankingResp) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableSchemaUserRankingResp) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableSchemaUserRankingResp(val *SchemaUserRankingResp) *NullableSchemaUserRankingResp {
|
||||
return &NullableSchemaUserRankingResp{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableSchemaUserRankingResp) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableSchemaUserRankingResp) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user