mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
217 lines
4.8 KiB
Go
217 lines
4.8 KiB
Go
/*
|
|
Membership API
|
|
|
|
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
|
|
API version: 0.1.0
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package membershipclient
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the Cursor type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &Cursor{}
|
|
|
|
// Cursor struct for Cursor
|
|
type Cursor struct {
|
|
PageSize int64 `json:"pageSize"`
|
|
HasMore bool `json:"hasMore"`
|
|
Previous *string `json:"previous,omitempty"`
|
|
Next *string `json:"next,omitempty"`
|
|
}
|
|
|
|
// NewCursor instantiates a new Cursor 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 NewCursor(pageSize int64, hasMore bool) *Cursor {
|
|
this := Cursor{}
|
|
this.PageSize = pageSize
|
|
this.HasMore = hasMore
|
|
return &this
|
|
}
|
|
|
|
// NewCursorWithDefaults instantiates a new Cursor 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 NewCursorWithDefaults() *Cursor {
|
|
this := Cursor{}
|
|
return &this
|
|
}
|
|
|
|
// GetPageSize returns the PageSize field value
|
|
func (o *Cursor) GetPageSize() int64 {
|
|
if o == nil {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
|
|
return o.PageSize
|
|
}
|
|
|
|
// GetPageSizeOk returns a tuple with the PageSize field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Cursor) GetPageSizeOk() (*int64, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.PageSize, true
|
|
}
|
|
|
|
// SetPageSize sets field value
|
|
func (o *Cursor) SetPageSize(v int64) {
|
|
o.PageSize = v
|
|
}
|
|
|
|
// GetHasMore returns the HasMore field value
|
|
func (o *Cursor) GetHasMore() bool {
|
|
if o == nil {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
|
|
return o.HasMore
|
|
}
|
|
|
|
// GetHasMoreOk returns a tuple with the HasMore field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Cursor) GetHasMoreOk() (*bool, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.HasMore, true
|
|
}
|
|
|
|
// SetHasMore sets field value
|
|
func (o *Cursor) SetHasMore(v bool) {
|
|
o.HasMore = v
|
|
}
|
|
|
|
// GetPrevious returns the Previous field value if set, zero value otherwise.
|
|
func (o *Cursor) GetPrevious() string {
|
|
if o == nil || IsNil(o.Previous) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Previous
|
|
}
|
|
|
|
// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Cursor) GetPreviousOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Previous) {
|
|
return nil, false
|
|
}
|
|
return o.Previous, true
|
|
}
|
|
|
|
// HasPrevious returns a boolean if a field has been set.
|
|
func (o *Cursor) HasPrevious() bool {
|
|
if o != nil && !IsNil(o.Previous) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPrevious gets a reference to the given string and assigns it to the Previous field.
|
|
func (o *Cursor) SetPrevious(v string) {
|
|
o.Previous = &v
|
|
}
|
|
|
|
// GetNext returns the Next field value if set, zero value otherwise.
|
|
func (o *Cursor) GetNext() string {
|
|
if o == nil || IsNil(o.Next) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Next
|
|
}
|
|
|
|
// GetNextOk returns a tuple with the Next field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Cursor) GetNextOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Next) {
|
|
return nil, false
|
|
}
|
|
return o.Next, true
|
|
}
|
|
|
|
// HasNext returns a boolean if a field has been set.
|
|
func (o *Cursor) HasNext() bool {
|
|
if o != nil && !IsNil(o.Next) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNext gets a reference to the given string and assigns it to the Next field.
|
|
func (o *Cursor) SetNext(v string) {
|
|
o.Next = &v
|
|
}
|
|
|
|
func (o Cursor) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o Cursor) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["pageSize"] = o.PageSize
|
|
toSerialize["hasMore"] = o.HasMore
|
|
if !IsNil(o.Previous) {
|
|
toSerialize["previous"] = o.Previous
|
|
}
|
|
if !IsNil(o.Next) {
|
|
toSerialize["next"] = o.Next
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableCursor struct {
|
|
value *Cursor
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableCursor) Get() *Cursor {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableCursor) Set(val *Cursor) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableCursor) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableCursor) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableCursor(val *Cursor) *NullableCursor {
|
|
return &NullableCursor{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableCursor) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableCursor) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|