271 lines
6.9 KiB
Go
271 lines
6.9 KiB
Go
/*
|
|
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 SchemaQuestionPageReq type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SchemaQuestionPageReq{}
|
|
|
|
// SchemaQuestionPageReq struct for SchemaQuestionPageReq
|
|
type SchemaQuestionPageReq struct {
|
|
OrderCond *string `json:"orderCond,omitempty"`
|
|
Page *int32 `json:"page,omitempty"`
|
|
PageSize *int32 `json:"pageSize,omitempty"`
|
|
Tag *string `json:"tag,omitempty"`
|
|
Username *string `json:"username,omitempty"`
|
|
}
|
|
|
|
// NewSchemaQuestionPageReq instantiates a new SchemaQuestionPageReq 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 NewSchemaQuestionPageReq() *SchemaQuestionPageReq {
|
|
this := SchemaQuestionPageReq{}
|
|
return &this
|
|
}
|
|
|
|
// NewSchemaQuestionPageReqWithDefaults instantiates a new SchemaQuestionPageReq 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 NewSchemaQuestionPageReqWithDefaults() *SchemaQuestionPageReq {
|
|
this := SchemaQuestionPageReq{}
|
|
return &this
|
|
}
|
|
|
|
// GetOrderCond returns the OrderCond field value if set, zero value otherwise.
|
|
func (o *SchemaQuestionPageReq) GetOrderCond() string {
|
|
if o == nil || IsNil(o.OrderCond) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.OrderCond
|
|
}
|
|
|
|
// GetOrderCondOk returns a tuple with the OrderCond field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaQuestionPageReq) GetOrderCondOk() (*string, bool) {
|
|
if o == nil || IsNil(o.OrderCond) {
|
|
return nil, false
|
|
}
|
|
return o.OrderCond, true
|
|
}
|
|
|
|
// HasOrderCond returns a boolean if a field has been set.
|
|
func (o *SchemaQuestionPageReq) HasOrderCond() bool {
|
|
if o != nil && !IsNil(o.OrderCond) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOrderCond gets a reference to the given string and assigns it to the OrderCond field.
|
|
func (o *SchemaQuestionPageReq) SetOrderCond(v string) {
|
|
o.OrderCond = &v
|
|
}
|
|
|
|
// GetPage returns the Page field value if set, zero value otherwise.
|
|
func (o *SchemaQuestionPageReq) GetPage() int32 {
|
|
if o == nil || IsNil(o.Page) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.Page
|
|
}
|
|
|
|
// GetPageOk returns a tuple with the Page field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaQuestionPageReq) GetPageOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.Page) {
|
|
return nil, false
|
|
}
|
|
return o.Page, true
|
|
}
|
|
|
|
// HasPage returns a boolean if a field has been set.
|
|
func (o *SchemaQuestionPageReq) HasPage() bool {
|
|
if o != nil && !IsNil(o.Page) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPage gets a reference to the given int32 and assigns it to the Page field.
|
|
func (o *SchemaQuestionPageReq) SetPage(v int32) {
|
|
o.Page = &v
|
|
}
|
|
|
|
// GetPageSize returns the PageSize field value if set, zero value otherwise.
|
|
func (o *SchemaQuestionPageReq) GetPageSize() int32 {
|
|
if o == nil || IsNil(o.PageSize) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.PageSize
|
|
}
|
|
|
|
// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaQuestionPageReq) GetPageSizeOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.PageSize) {
|
|
return nil, false
|
|
}
|
|
return o.PageSize, true
|
|
}
|
|
|
|
// HasPageSize returns a boolean if a field has been set.
|
|
func (o *SchemaQuestionPageReq) HasPageSize() bool {
|
|
if o != nil && !IsNil(o.PageSize) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPageSize gets a reference to the given int32 and assigns it to the PageSize field.
|
|
func (o *SchemaQuestionPageReq) SetPageSize(v int32) {
|
|
o.PageSize = &v
|
|
}
|
|
|
|
// GetTag returns the Tag field value if set, zero value otherwise.
|
|
func (o *SchemaQuestionPageReq) GetTag() string {
|
|
if o == nil || IsNil(o.Tag) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Tag
|
|
}
|
|
|
|
// GetTagOk returns a tuple with the Tag field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SchemaQuestionPageReq) GetTagOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Tag) {
|
|
return nil, false
|
|
}
|
|
return o.Tag, true
|
|
}
|
|
|
|
// HasTag returns a boolean if a field has been set.
|
|
func (o *SchemaQuestionPageReq) HasTag() bool {
|
|
if o != nil && !IsNil(o.Tag) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTag gets a reference to the given string and assigns it to the Tag field.
|
|
func (o *SchemaQuestionPageReq) SetTag(v string) {
|
|
o.Tag = &v
|
|
}
|
|
|
|
// GetUsername returns the Username field value if set, zero value otherwise.
|
|
func (o *SchemaQuestionPageReq) 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 *SchemaQuestionPageReq) 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 *SchemaQuestionPageReq) 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 *SchemaQuestionPageReq) SetUsername(v string) {
|
|
o.Username = &v
|
|
}
|
|
|
|
func (o SchemaQuestionPageReq) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o SchemaQuestionPageReq) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.OrderCond) {
|
|
toSerialize["orderCond"] = o.OrderCond
|
|
}
|
|
if !IsNil(o.Page) {
|
|
toSerialize["page"] = o.Page
|
|
}
|
|
if !IsNil(o.PageSize) {
|
|
toSerialize["pageSize"] = o.PageSize
|
|
}
|
|
if !IsNil(o.Tag) {
|
|
toSerialize["tag"] = o.Tag
|
|
}
|
|
if !IsNil(o.Username) {
|
|
toSerialize["username"] = o.Username
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableSchemaQuestionPageReq struct {
|
|
value *SchemaQuestionPageReq
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSchemaQuestionPageReq) Get() *SchemaQuestionPageReq {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSchemaQuestionPageReq) Set(val *SchemaQuestionPageReq) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSchemaQuestionPageReq) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSchemaQuestionPageReq) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSchemaQuestionPageReq(val *SchemaQuestionPageReq) *NullableSchemaQuestionPageReq {
|
|
return &NullableSchemaQuestionPageReq{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSchemaQuestionPageReq) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSchemaQuestionPageReq) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|