533 lines
14 KiB
Go
533 lines
14 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 SchemaGetUserPageResp type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SchemaGetUserPageResp{}
|
|
|
|
// SchemaGetUserPageResp struct for SchemaGetUserPageResp
|
|
type SchemaGetUserPageResp struct {
|
|
// avatar
|
|
Avatar *string `json:"avatar,omitempty"`
|
|
// create time
|
|
CreatedAt *int32 `json:"created_at,omitempty"`
|
|
// delete time
|
|
DeletedAt *int32 `json:"deleted_at,omitempty"`
|
|
// display name
|
|
DisplayName *string `json:"display_name,omitempty"`
|
|
// email
|
|
EMail *string `json:"e_mail,omitempty"`
|
|
// rank
|
|
Rank *int32 `json:"rank,omitempty"`
|
|
// role id
|
|
RoleId *int32 `json:"role_id,omitempty"`
|
|
// role name
|
|
RoleName *string `json:"role_name,omitempty"`
|
|
// user status(normal,suspended,deleted,inactive)
|
|
Status *string `json:"status,omitempty"`
|
|
// suspended time
|
|
SuspendedAt *int32 `json:"suspended_at,omitempty"`
|
|
// user id
|
|
UserId *string `json:"user_id,omitempty"`
|
|
// username
|
|
Username *string `json:"username,omitempty"`
|
|
}
|
|
|
|
// NewSchemaGetUserPageResp instantiates a new SchemaGetUserPageResp 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 NewSchemaGetUserPageResp() *SchemaGetUserPageResp {
|
|
this := SchemaGetUserPageResp{}
|
|
return &this
|
|
}
|
|
|
|
// NewSchemaGetUserPageRespWithDefaults instantiates a new SchemaGetUserPageResp 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 NewSchemaGetUserPageRespWithDefaults() *SchemaGetUserPageResp {
|
|
this := SchemaGetUserPageResp{}
|
|
return &this
|
|
}
|
|
|
|
// GetAvatar returns the Avatar field value if set, zero value otherwise.
|
|
func (o *SchemaGetUserPageResp) 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 *SchemaGetUserPageResp) 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 *SchemaGetUserPageResp) 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 *SchemaGetUserPageResp) SetAvatar(v string) {
|
|
o.Avatar = &v
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *SchemaGetUserPageResp) 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 *SchemaGetUserPageResp) 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 *SchemaGetUserPageResp) 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 *SchemaGetUserPageResp) SetCreatedAt(v int32) {
|
|
o.CreatedAt = &v
|
|
}
|
|
|
|
// GetDeletedAt returns the DeletedAt field value if set, zero value otherwise.
|
|
func (o *SchemaGetUserPageResp) GetDeletedAt() int32 {
|
|
if o == nil || IsNil(o.DeletedAt) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.DeletedAt
|
|
}
|
|
|
|
// GetDeletedAtOk returns a tuple with the DeletedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaGetUserPageResp) GetDeletedAtOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.DeletedAt) {
|
|
return nil, false
|
|
}
|
|
return o.DeletedAt, true
|
|
}
|
|
|
|
// HasDeletedAt returns a boolean if a field has been set.
|
|
func (o *SchemaGetUserPageResp) HasDeletedAt() bool {
|
|
if o != nil && !IsNil(o.DeletedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDeletedAt gets a reference to the given int32 and assigns it to the DeletedAt field.
|
|
func (o *SchemaGetUserPageResp) SetDeletedAt(v int32) {
|
|
o.DeletedAt = &v
|
|
}
|
|
|
|
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
|
|
func (o *SchemaGetUserPageResp) 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 *SchemaGetUserPageResp) 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 *SchemaGetUserPageResp) 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 *SchemaGetUserPageResp) SetDisplayName(v string) {
|
|
o.DisplayName = &v
|
|
}
|
|
|
|
// GetEMail returns the EMail field value if set, zero value otherwise.
|
|
func (o *SchemaGetUserPageResp) GetEMail() string {
|
|
if o == nil || IsNil(o.EMail) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.EMail
|
|
}
|
|
|
|
// GetEMailOk returns a tuple with the EMail field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaGetUserPageResp) GetEMailOk() (*string, bool) {
|
|
if o == nil || IsNil(o.EMail) {
|
|
return nil, false
|
|
}
|
|
return o.EMail, true
|
|
}
|
|
|
|
// HasEMail returns a boolean if a field has been set.
|
|
func (o *SchemaGetUserPageResp) HasEMail() bool {
|
|
if o != nil && !IsNil(o.EMail) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEMail gets a reference to the given string and assigns it to the EMail field.
|
|
func (o *SchemaGetUserPageResp) SetEMail(v string) {
|
|
o.EMail = &v
|
|
}
|
|
|
|
// GetRank returns the Rank field value if set, zero value otherwise.
|
|
func (o *SchemaGetUserPageResp) 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 *SchemaGetUserPageResp) 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 *SchemaGetUserPageResp) 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 *SchemaGetUserPageResp) SetRank(v int32) {
|
|
o.Rank = &v
|
|
}
|
|
|
|
// GetRoleId returns the RoleId field value if set, zero value otherwise.
|
|
func (o *SchemaGetUserPageResp) GetRoleId() int32 {
|
|
if o == nil || IsNil(o.RoleId) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.RoleId
|
|
}
|
|
|
|
// GetRoleIdOk returns a tuple with the RoleId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaGetUserPageResp) GetRoleIdOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.RoleId) {
|
|
return nil, false
|
|
}
|
|
return o.RoleId, true
|
|
}
|
|
|
|
// HasRoleId returns a boolean if a field has been set.
|
|
func (o *SchemaGetUserPageResp) HasRoleId() bool {
|
|
if o != nil && !IsNil(o.RoleId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRoleId gets a reference to the given int32 and assigns it to the RoleId field.
|
|
func (o *SchemaGetUserPageResp) SetRoleId(v int32) {
|
|
o.RoleId = &v
|
|
}
|
|
|
|
// GetRoleName returns the RoleName field value if set, zero value otherwise.
|
|
func (o *SchemaGetUserPageResp) GetRoleName() string {
|
|
if o == nil || IsNil(o.RoleName) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.RoleName
|
|
}
|
|
|
|
// GetRoleNameOk returns a tuple with the RoleName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaGetUserPageResp) GetRoleNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.RoleName) {
|
|
return nil, false
|
|
}
|
|
return o.RoleName, true
|
|
}
|
|
|
|
// HasRoleName returns a boolean if a field has been set.
|
|
func (o *SchemaGetUserPageResp) HasRoleName() bool {
|
|
if o != nil && !IsNil(o.RoleName) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRoleName gets a reference to the given string and assigns it to the RoleName field.
|
|
func (o *SchemaGetUserPageResp) SetRoleName(v string) {
|
|
o.RoleName = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *SchemaGetUserPageResp) 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 *SchemaGetUserPageResp) 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 *SchemaGetUserPageResp) 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 *SchemaGetUserPageResp) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetSuspendedAt returns the SuspendedAt field value if set, zero value otherwise.
|
|
func (o *SchemaGetUserPageResp) GetSuspendedAt() int32 {
|
|
if o == nil || IsNil(o.SuspendedAt) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.SuspendedAt
|
|
}
|
|
|
|
// GetSuspendedAtOk returns a tuple with the SuspendedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaGetUserPageResp) GetSuspendedAtOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.SuspendedAt) {
|
|
return nil, false
|
|
}
|
|
return o.SuspendedAt, true
|
|
}
|
|
|
|
// HasSuspendedAt returns a boolean if a field has been set.
|
|
func (o *SchemaGetUserPageResp) HasSuspendedAt() bool {
|
|
if o != nil && !IsNil(o.SuspendedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSuspendedAt gets a reference to the given int32 and assigns it to the SuspendedAt field.
|
|
func (o *SchemaGetUserPageResp) SetSuspendedAt(v int32) {
|
|
o.SuspendedAt = &v
|
|
}
|
|
|
|
// GetUserId returns the UserId field value if set, zero value otherwise.
|
|
func (o *SchemaGetUserPageResp) GetUserId() string {
|
|
if o == nil || IsNil(o.UserId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.UserId
|
|
}
|
|
|
|
// GetUserIdOk returns a tuple with the UserId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaGetUserPageResp) GetUserIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.UserId) {
|
|
return nil, false
|
|
}
|
|
return o.UserId, true
|
|
}
|
|
|
|
// HasUserId returns a boolean if a field has been set.
|
|
func (o *SchemaGetUserPageResp) HasUserId() bool {
|
|
if o != nil && !IsNil(o.UserId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUserId gets a reference to the given string and assigns it to the UserId field.
|
|
func (o *SchemaGetUserPageResp) SetUserId(v string) {
|
|
o.UserId = &v
|
|
}
|
|
|
|
// GetUsername returns the Username field value if set, zero value otherwise.
|
|
func (o *SchemaGetUserPageResp) 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 *SchemaGetUserPageResp) 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 *SchemaGetUserPageResp) 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 *SchemaGetUserPageResp) SetUsername(v string) {
|
|
o.Username = &v
|
|
}
|
|
|
|
func (o SchemaGetUserPageResp) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o SchemaGetUserPageResp) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Avatar) {
|
|
toSerialize["avatar"] = o.Avatar
|
|
}
|
|
if !IsNil(o.CreatedAt) {
|
|
toSerialize["created_at"] = o.CreatedAt
|
|
}
|
|
if !IsNil(o.DeletedAt) {
|
|
toSerialize["deleted_at"] = o.DeletedAt
|
|
}
|
|
if !IsNil(o.DisplayName) {
|
|
toSerialize["display_name"] = o.DisplayName
|
|
}
|
|
if !IsNil(o.EMail) {
|
|
toSerialize["e_mail"] = o.EMail
|
|
}
|
|
if !IsNil(o.Rank) {
|
|
toSerialize["rank"] = o.Rank
|
|
}
|
|
if !IsNil(o.RoleId) {
|
|
toSerialize["role_id"] = o.RoleId
|
|
}
|
|
if !IsNil(o.RoleName) {
|
|
toSerialize["role_name"] = o.RoleName
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.SuspendedAt) {
|
|
toSerialize["suspended_at"] = o.SuspendedAt
|
|
}
|
|
if !IsNil(o.UserId) {
|
|
toSerialize["user_id"] = o.UserId
|
|
}
|
|
if !IsNil(o.Username) {
|
|
toSerialize["username"] = o.Username
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableSchemaGetUserPageResp struct {
|
|
value *SchemaGetUserPageResp
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSchemaGetUserPageResp) Get() *SchemaGetUserPageResp {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSchemaGetUserPageResp) Set(val *SchemaGetUserPageResp) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSchemaGetUserPageResp) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSchemaGetUserPageResp) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSchemaGetUserPageResp(val *SchemaGetUserPageResp) *NullableSchemaGetUserPageResp {
|
|
return &NullableSchemaGetUserPageResp{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSchemaGetUserPageResp) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSchemaGetUserPageResp) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|