first version
This commit is contained in:
423
model_schema_user_basic_info.go
Normal file
423
model_schema_user_basic_info.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 SchemaUserBasicInfo type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &SchemaUserBasicInfo{}
|
||||
|
||||
// SchemaUserBasicInfo struct for SchemaUserBasicInfo
|
||||
type SchemaUserBasicInfo struct {
|
||||
// avatar
|
||||
Avatar *string `json:"avatar,omitempty"`
|
||||
// display_name
|
||||
DisplayName *string `json:"display_name,omitempty"`
|
||||
// user_id
|
||||
Id *string `json:"id,omitempty"`
|
||||
// ip info
|
||||
IpInfo *string `json:"ip_info,omitempty"`
|
||||
// location
|
||||
Location *string `json:"location,omitempty"`
|
||||
// rank
|
||||
Rank *int32 `json:"rank,omitempty"`
|
||||
// status
|
||||
Status *string `json:"status,omitempty"`
|
||||
// name
|
||||
Username *string `json:"username,omitempty"`
|
||||
// website
|
||||
Website *string `json:"website,omitempty"`
|
||||
}
|
||||
|
||||
// NewSchemaUserBasicInfo instantiates a new SchemaUserBasicInfo 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 NewSchemaUserBasicInfo() *SchemaUserBasicInfo {
|
||||
this := SchemaUserBasicInfo{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewSchemaUserBasicInfoWithDefaults instantiates a new SchemaUserBasicInfo 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 NewSchemaUserBasicInfoWithDefaults() *SchemaUserBasicInfo {
|
||||
this := SchemaUserBasicInfo{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAvatar returns the Avatar field value if set, zero value otherwise.
|
||||
func (o *SchemaUserBasicInfo) GetAvatar() string {
|
||||
if o == nil || IsNil(o.Avatar) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Avatar
|
||||
}
|
||||
|
||||
// GetAvatarOk returns a tuple with the Avatar field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaUserBasicInfo) GetAvatarOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Avatar) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Avatar, true
|
||||
}
|
||||
|
||||
// HasAvatar returns a boolean if a field has been set.
|
||||
func (o *SchemaUserBasicInfo) HasAvatar() bool {
|
||||
if o != nil && !IsNil(o.Avatar) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetAvatar gets a reference to the given string and assigns it to the Avatar field.
|
||||
func (o *SchemaUserBasicInfo) SetAvatar(v string) {
|
||||
o.Avatar = &v
|
||||
}
|
||||
|
||||
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
|
||||
func (o *SchemaUserBasicInfo) GetDisplayName() string {
|
||||
if o == nil || IsNil(o.DisplayName) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.DisplayName
|
||||
}
|
||||
|
||||
// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaUserBasicInfo) GetDisplayNameOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.DisplayName) {
|
||||
return nil, false
|
||||
}
|
||||
return o.DisplayName, true
|
||||
}
|
||||
|
||||
// HasDisplayName returns a boolean if a field has been set.
|
||||
func (o *SchemaUserBasicInfo) HasDisplayName() bool {
|
||||
if o != nil && !IsNil(o.DisplayName) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
|
||||
func (o *SchemaUserBasicInfo) SetDisplayName(v string) {
|
||||
o.DisplayName = &v
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *SchemaUserBasicInfo) 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 *SchemaUserBasicInfo) 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 *SchemaUserBasicInfo) 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 *SchemaUserBasicInfo) SetId(v string) {
|
||||
o.Id = &v
|
||||
}
|
||||
|
||||
// GetIpInfo returns the IpInfo field value if set, zero value otherwise.
|
||||
func (o *SchemaUserBasicInfo) GetIpInfo() string {
|
||||
if o == nil || IsNil(o.IpInfo) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.IpInfo
|
||||
}
|
||||
|
||||
// GetIpInfoOk returns a tuple with the IpInfo field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaUserBasicInfo) GetIpInfoOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.IpInfo) {
|
||||
return nil, false
|
||||
}
|
||||
return o.IpInfo, true
|
||||
}
|
||||
|
||||
// HasIpInfo returns a boolean if a field has been set.
|
||||
func (o *SchemaUserBasicInfo) HasIpInfo() bool {
|
||||
if o != nil && !IsNil(o.IpInfo) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetIpInfo gets a reference to the given string and assigns it to the IpInfo field.
|
||||
func (o *SchemaUserBasicInfo) SetIpInfo(v string) {
|
||||
o.IpInfo = &v
|
||||
}
|
||||
|
||||
// GetLocation returns the Location field value if set, zero value otherwise.
|
||||
func (o *SchemaUserBasicInfo) GetLocation() string {
|
||||
if o == nil || IsNil(o.Location) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Location
|
||||
}
|
||||
|
||||
// GetLocationOk returns a tuple with the Location field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaUserBasicInfo) GetLocationOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Location) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Location, true
|
||||
}
|
||||
|
||||
// HasLocation returns a boolean if a field has been set.
|
||||
func (o *SchemaUserBasicInfo) HasLocation() bool {
|
||||
if o != nil && !IsNil(o.Location) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetLocation gets a reference to the given string and assigns it to the Location field.
|
||||
func (o *SchemaUserBasicInfo) SetLocation(v string) {
|
||||
o.Location = &v
|
||||
}
|
||||
|
||||
// GetRank returns the Rank field value if set, zero value otherwise.
|
||||
func (o *SchemaUserBasicInfo) GetRank() int32 {
|
||||
if o == nil || IsNil(o.Rank) {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Rank
|
||||
}
|
||||
|
||||
// GetRankOk returns a tuple with the Rank field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaUserBasicInfo) GetRankOk() (*int32, bool) {
|
||||
if o == nil || IsNil(o.Rank) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Rank, true
|
||||
}
|
||||
|
||||
// HasRank returns a boolean if a field has been set.
|
||||
func (o *SchemaUserBasicInfo) HasRank() bool {
|
||||
if o != nil && !IsNil(o.Rank) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRank gets a reference to the given int32 and assigns it to the Rank field.
|
||||
func (o *SchemaUserBasicInfo) SetRank(v int32) {
|
||||
o.Rank = &v
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value if set, zero value otherwise.
|
||||
func (o *SchemaUserBasicInfo) 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 *SchemaUserBasicInfo) 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 *SchemaUserBasicInfo) 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 *SchemaUserBasicInfo) SetStatus(v string) {
|
||||
o.Status = &v
|
||||
}
|
||||
|
||||
// GetUsername returns the Username field value if set, zero value otherwise.
|
||||
func (o *SchemaUserBasicInfo) GetUsername() string {
|
||||
if o == nil || IsNil(o.Username) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Username
|
||||
}
|
||||
|
||||
// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaUserBasicInfo) GetUsernameOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Username) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Username, true
|
||||
}
|
||||
|
||||
// HasUsername returns a boolean if a field has been set.
|
||||
func (o *SchemaUserBasicInfo) HasUsername() bool {
|
||||
if o != nil && !IsNil(o.Username) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetUsername gets a reference to the given string and assigns it to the Username field.
|
||||
func (o *SchemaUserBasicInfo) SetUsername(v string) {
|
||||
o.Username = &v
|
||||
}
|
||||
|
||||
// GetWebsite returns the Website field value if set, zero value otherwise.
|
||||
func (o *SchemaUserBasicInfo) GetWebsite() string {
|
||||
if o == nil || IsNil(o.Website) {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Website
|
||||
}
|
||||
|
||||
// GetWebsiteOk returns a tuple with the Website field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SchemaUserBasicInfo) GetWebsiteOk() (*string, bool) {
|
||||
if o == nil || IsNil(o.Website) {
|
||||
return nil, false
|
||||
}
|
||||
return o.Website, true
|
||||
}
|
||||
|
||||
// HasWebsite returns a boolean if a field has been set.
|
||||
func (o *SchemaUserBasicInfo) HasWebsite() bool {
|
||||
if o != nil && !IsNil(o.Website) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetWebsite gets a reference to the given string and assigns it to the Website field.
|
||||
func (o *SchemaUserBasicInfo) SetWebsite(v string) {
|
||||
o.Website = &v
|
||||
}
|
||||
|
||||
func (o SchemaUserBasicInfo) MarshalJSON() ([]byte, error) {
|
||||
toSerialize,err := o.ToMap()
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
func (o SchemaUserBasicInfo) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if !IsNil(o.Avatar) {
|
||||
toSerialize["avatar"] = o.Avatar
|
||||
}
|
||||
if !IsNil(o.DisplayName) {
|
||||
toSerialize["display_name"] = o.DisplayName
|
||||
}
|
||||
if !IsNil(o.Id) {
|
||||
toSerialize["id"] = o.Id
|
||||
}
|
||||
if !IsNil(o.IpInfo) {
|
||||
toSerialize["ip_info"] = o.IpInfo
|
||||
}
|
||||
if !IsNil(o.Location) {
|
||||
toSerialize["location"] = o.Location
|
||||
}
|
||||
if !IsNil(o.Rank) {
|
||||
toSerialize["rank"] = o.Rank
|
||||
}
|
||||
if !IsNil(o.Status) {
|
||||
toSerialize["status"] = o.Status
|
||||
}
|
||||
if !IsNil(o.Username) {
|
||||
toSerialize["username"] = o.Username
|
||||
}
|
||||
if !IsNil(o.Website) {
|
||||
toSerialize["website"] = o.Website
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableSchemaUserBasicInfo struct {
|
||||
value *SchemaUserBasicInfo
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableSchemaUserBasicInfo) Get() *SchemaUserBasicInfo {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableSchemaUserBasicInfo) Set(val *SchemaUserBasicInfo) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableSchemaUserBasicInfo) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableSchemaUserBasicInfo) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableSchemaUserBasicInfo(val *SchemaUserBasicInfo) *NullableSchemaUserBasicInfo {
|
||||
return &NullableSchemaUserBasicInfo{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableSchemaUserBasicInfo) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableSchemaUserBasicInfo) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user