188 lines
4.3 KiB
Go
188 lines
4.3 KiB
Go
/*
|
|
Zinc Search engine API
|
|
|
|
Zinc Search engine API documents https://docs.zincsearch.com
|
|
|
|
API version: 0.3.3
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package client
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// MetaPage struct for MetaPage
|
|
type MetaPage struct {
|
|
PageNum *int32 `json:"page_num,omitempty"`
|
|
PageSize *int32 `json:"page_size,omitempty"`
|
|
Total *int32 `json:"total,omitempty"`
|
|
}
|
|
|
|
// NewMetaPage instantiates a new MetaPage 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 NewMetaPage() *MetaPage {
|
|
this := MetaPage{}
|
|
return &this
|
|
}
|
|
|
|
// NewMetaPageWithDefaults instantiates a new MetaPage 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 NewMetaPageWithDefaults() *MetaPage {
|
|
this := MetaPage{}
|
|
return &this
|
|
}
|
|
|
|
// GetPageNum returns the PageNum field value if set, zero value otherwise.
|
|
func (o *MetaPage) GetPageNum() int32 {
|
|
if o == nil || o.PageNum == nil {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.PageNum
|
|
}
|
|
|
|
// GetPageNumOk returns a tuple with the PageNum field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MetaPage) GetPageNumOk() (*int32, bool) {
|
|
if o == nil || o.PageNum == nil {
|
|
return nil, false
|
|
}
|
|
return o.PageNum, true
|
|
}
|
|
|
|
// HasPageNum returns a boolean if a field has been set.
|
|
func (o *MetaPage) HasPageNum() bool {
|
|
if o != nil && o.PageNum != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPageNum gets a reference to the given int32 and assigns it to the PageNum field.
|
|
func (o *MetaPage) SetPageNum(v int32) {
|
|
o.PageNum = &v
|
|
}
|
|
|
|
// GetPageSize returns the PageSize field value if set, zero value otherwise.
|
|
func (o *MetaPage) GetPageSize() int32 {
|
|
if o == nil || o.PageSize == nil {
|
|
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 *MetaPage) GetPageSizeOk() (*int32, bool) {
|
|
if o == nil || o.PageSize == nil {
|
|
return nil, false
|
|
}
|
|
return o.PageSize, true
|
|
}
|
|
|
|
// HasPageSize returns a boolean if a field has been set.
|
|
func (o *MetaPage) HasPageSize() bool {
|
|
if o != nil && o.PageSize != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPageSize gets a reference to the given int32 and assigns it to the PageSize field.
|
|
func (o *MetaPage) SetPageSize(v int32) {
|
|
o.PageSize = &v
|
|
}
|
|
|
|
// GetTotal returns the Total field value if set, zero value otherwise.
|
|
func (o *MetaPage) GetTotal() int32 {
|
|
if o == nil || o.Total == nil {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.Total
|
|
}
|
|
|
|
// GetTotalOk returns a tuple with the Total field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MetaPage) GetTotalOk() (*int32, bool) {
|
|
if o == nil || o.Total == nil {
|
|
return nil, false
|
|
}
|
|
return o.Total, true
|
|
}
|
|
|
|
// HasTotal returns a boolean if a field has been set.
|
|
func (o *MetaPage) HasTotal() bool {
|
|
if o != nil && o.Total != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTotal gets a reference to the given int32 and assigns it to the Total field.
|
|
func (o *MetaPage) SetTotal(v int32) {
|
|
o.Total = &v
|
|
}
|
|
|
|
func (o MetaPage) MarshalJSON() ([]byte, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if o.PageNum != nil {
|
|
toSerialize["page_num"] = o.PageNum
|
|
}
|
|
if o.PageSize != nil {
|
|
toSerialize["page_size"] = o.PageSize
|
|
}
|
|
if o.Total != nil {
|
|
toSerialize["total"] = o.Total
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
type NullableMetaPage struct {
|
|
value *MetaPage
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableMetaPage) Get() *MetaPage {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableMetaPage) Set(val *MetaPage) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableMetaPage) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableMetaPage) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableMetaPage(val *MetaPage) *NullableMetaPage {
|
|
return &NullableMetaPage{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableMetaPage) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableMetaPage) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|