chore: initial push to be able to work together
This commit is contained in:
parent
81e8d48cf6
commit
30070d8470
263 changed files with 45437 additions and 2 deletions
298
pkg/sqlserverflexalpha/model_pagination.go
Normal file
298
pkg/sqlserverflexalpha/model_pagination.go
Normal file
|
|
@ -0,0 +1,298 @@
|
|||
/*
|
||||
STACKIT MSSQL Service API
|
||||
|
||||
This is the documentation for the STACKIT MSSQL service
|
||||
|
||||
API version: 3alpha1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package sqlserverflexalpha
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the Pagination type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &Pagination{}
|
||||
|
||||
/*
|
||||
types and functions for page
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type PaginationGetPageAttributeType = *int64
|
||||
type PaginationGetPageArgType = int64
|
||||
type PaginationGetPageRetType = int64
|
||||
|
||||
func getPaginationGetPageAttributeTypeOk(arg PaginationGetPageAttributeType) (ret PaginationGetPageRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setPaginationGetPageAttributeType(arg *PaginationGetPageAttributeType, val PaginationGetPageRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for size
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type PaginationGetSizeAttributeType = *int64
|
||||
type PaginationGetSizeArgType = int64
|
||||
type PaginationGetSizeRetType = int64
|
||||
|
||||
func getPaginationGetSizeAttributeTypeOk(arg PaginationGetSizeAttributeType) (ret PaginationGetSizeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setPaginationGetSizeAttributeType(arg *PaginationGetSizeAttributeType, val PaginationGetSizeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for sort
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type PaginationGetSortAttributeType = *string
|
||||
|
||||
func getPaginationGetSortAttributeTypeOk(arg PaginationGetSortAttributeType) (ret PaginationGetSortRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setPaginationGetSortAttributeType(arg *PaginationGetSortAttributeType, val PaginationGetSortRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type PaginationGetSortArgType = string
|
||||
type PaginationGetSortRetType = string
|
||||
|
||||
/*
|
||||
types and functions for totalPages
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type PaginationGetTotalPagesAttributeType = *int64
|
||||
type PaginationGetTotalPagesArgType = int64
|
||||
type PaginationGetTotalPagesRetType = int64
|
||||
|
||||
func getPaginationGetTotalPagesAttributeTypeOk(arg PaginationGetTotalPagesAttributeType) (ret PaginationGetTotalPagesRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setPaginationGetTotalPagesAttributeType(arg *PaginationGetTotalPagesAttributeType, val PaginationGetTotalPagesRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for totalRows
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type PaginationGetTotalRowsAttributeType = *int64
|
||||
type PaginationGetTotalRowsArgType = int64
|
||||
type PaginationGetTotalRowsRetType = int64
|
||||
|
||||
func getPaginationGetTotalRowsAttributeTypeOk(arg PaginationGetTotalRowsAttributeType) (ret PaginationGetTotalRowsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setPaginationGetTotalRowsAttributeType(arg *PaginationGetTotalRowsAttributeType, val PaginationGetTotalRowsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// Pagination struct for Pagination
|
||||
type Pagination struct {
|
||||
// REQUIRED
|
||||
Page PaginationGetPageAttributeType `json:"page" required:"true" validate:"required"`
|
||||
// REQUIRED
|
||||
Size PaginationGetSizeAttributeType `json:"size" required:"true" validate:"required"`
|
||||
// REQUIRED
|
||||
Sort PaginationGetSortAttributeType `json:"sort" required:"true" validate:"required"`
|
||||
// REQUIRED
|
||||
TotalPages PaginationGetTotalPagesAttributeType `json:"totalPages" required:"true" validate:"required"`
|
||||
// REQUIRED
|
||||
TotalRows PaginationGetTotalRowsAttributeType `json:"totalRows" required:"true" validate:"required"`
|
||||
}
|
||||
|
||||
type _Pagination Pagination
|
||||
|
||||
// NewPagination instantiates a new Pagination 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 NewPagination(page PaginationGetPageArgType, size PaginationGetSizeArgType, sort PaginationGetSortArgType, totalPages PaginationGetTotalPagesArgType, totalRows PaginationGetTotalRowsArgType) *Pagination {
|
||||
this := Pagination{}
|
||||
setPaginationGetPageAttributeType(&this.Page, page)
|
||||
setPaginationGetSizeAttributeType(&this.Size, size)
|
||||
setPaginationGetSortAttributeType(&this.Sort, sort)
|
||||
setPaginationGetTotalPagesAttributeType(&this.TotalPages, totalPages)
|
||||
setPaginationGetTotalRowsAttributeType(&this.TotalRows, totalRows)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewPaginationWithDefaults instantiates a new Pagination 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 NewPaginationWithDefaults() *Pagination {
|
||||
this := Pagination{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetPage returns the Page field value
|
||||
func (o *Pagination) GetPage() (ret PaginationGetPageRetType) {
|
||||
ret, _ = o.GetPageOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetPageOk returns a tuple with the Page field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Pagination) GetPageOk() (ret PaginationGetPageRetType, ok bool) {
|
||||
return getPaginationGetPageAttributeTypeOk(o.Page)
|
||||
}
|
||||
|
||||
// SetPage sets field value
|
||||
func (o *Pagination) SetPage(v PaginationGetPageRetType) {
|
||||
setPaginationGetPageAttributeType(&o.Page, v)
|
||||
}
|
||||
|
||||
// GetSize returns the Size field value
|
||||
func (o *Pagination) GetSize() (ret PaginationGetSizeRetType) {
|
||||
ret, _ = o.GetSizeOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetSizeOk returns a tuple with the Size field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Pagination) GetSizeOk() (ret PaginationGetSizeRetType, ok bool) {
|
||||
return getPaginationGetSizeAttributeTypeOk(o.Size)
|
||||
}
|
||||
|
||||
// SetSize sets field value
|
||||
func (o *Pagination) SetSize(v PaginationGetSizeRetType) {
|
||||
setPaginationGetSizeAttributeType(&o.Size, v)
|
||||
}
|
||||
|
||||
// GetSort returns the Sort field value
|
||||
func (o *Pagination) GetSort() (ret PaginationGetSortRetType) {
|
||||
ret, _ = o.GetSortOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetSortOk returns a tuple with the Sort field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Pagination) GetSortOk() (ret PaginationGetSortRetType, ok bool) {
|
||||
return getPaginationGetSortAttributeTypeOk(o.Sort)
|
||||
}
|
||||
|
||||
// SetSort sets field value
|
||||
func (o *Pagination) SetSort(v PaginationGetSortRetType) {
|
||||
setPaginationGetSortAttributeType(&o.Sort, v)
|
||||
}
|
||||
|
||||
// GetTotalPages returns the TotalPages field value
|
||||
func (o *Pagination) GetTotalPages() (ret PaginationGetTotalPagesRetType) {
|
||||
ret, _ = o.GetTotalPagesOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetTotalPagesOk returns a tuple with the TotalPages field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Pagination) GetTotalPagesOk() (ret PaginationGetTotalPagesRetType, ok bool) {
|
||||
return getPaginationGetTotalPagesAttributeTypeOk(o.TotalPages)
|
||||
}
|
||||
|
||||
// SetTotalPages sets field value
|
||||
func (o *Pagination) SetTotalPages(v PaginationGetTotalPagesRetType) {
|
||||
setPaginationGetTotalPagesAttributeType(&o.TotalPages, v)
|
||||
}
|
||||
|
||||
// GetTotalRows returns the TotalRows field value
|
||||
func (o *Pagination) GetTotalRows() (ret PaginationGetTotalRowsRetType) {
|
||||
ret, _ = o.GetTotalRowsOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetTotalRowsOk returns a tuple with the TotalRows field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Pagination) GetTotalRowsOk() (ret PaginationGetTotalRowsRetType, ok bool) {
|
||||
return getPaginationGetTotalRowsAttributeTypeOk(o.TotalRows)
|
||||
}
|
||||
|
||||
// SetTotalRows sets field value
|
||||
func (o *Pagination) SetTotalRows(v PaginationGetTotalRowsRetType) {
|
||||
setPaginationGetTotalRowsAttributeType(&o.TotalRows, v)
|
||||
}
|
||||
|
||||
func (o Pagination) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getPaginationGetPageAttributeTypeOk(o.Page); ok {
|
||||
toSerialize["Page"] = val
|
||||
}
|
||||
if val, ok := getPaginationGetSizeAttributeTypeOk(o.Size); ok {
|
||||
toSerialize["Size"] = val
|
||||
}
|
||||
if val, ok := getPaginationGetSortAttributeTypeOk(o.Sort); ok {
|
||||
toSerialize["Sort"] = val
|
||||
}
|
||||
if val, ok := getPaginationGetTotalPagesAttributeTypeOk(o.TotalPages); ok {
|
||||
toSerialize["TotalPages"] = val
|
||||
}
|
||||
if val, ok := getPaginationGetTotalRowsAttributeTypeOk(o.TotalRows); ok {
|
||||
toSerialize["TotalRows"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullablePagination struct {
|
||||
value *Pagination
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullablePagination) Get() *Pagination {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullablePagination) Set(val *Pagination) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullablePagination) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullablePagination) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullablePagination(val *Pagination) *NullablePagination {
|
||||
return &NullablePagination{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullablePagination) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullablePagination) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue