terraform-provider-stackitp.../pkg/postgresflexalpha/model_pagination.go
Marcel S. Henselin 2733834fc9
Some checks failed
CI Workflow / CI (push) Has been cancelled
CI Workflow / Check GoReleaser config (push) Has been cancelled
CI Workflow / Code coverage report (push) Has been cancelled
Alpha (#4)
* chore: initial push to be able to work together

* chore: add missing wait folder

* chore: add missing folders

* chore: cleanup alpha branch

* feat: mssql alpha instance (#2)

* fix: remove unused attribute types and functions from backup models

* fix: update API client references to use sqlserverflexalpha package

* fix: update package references to use sqlserverflexalpha and modify user data source model

* fix: add sqlserverflexalpha user data source to provider

* fix: add sqlserverflexalpha user resource and update related functionality

* chore: add stackit_sqlserverflexalpha_user resource and instance_id variable

* fix: refactor sqlserverflexalpha user resource and enhance schema with status and default_database

---------

Co-authored-by: Andre Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>

* feat: add sqlserver instance

* chore: fixing tests

* chore: update docs

---------

Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-authored-by: Andre Harms <andre.harms@stackit.cloud>
2025-12-19 11:37:53 +01:00

298 lines
8.4 KiB
Go

/*
PostgreSQL Flex API
This is the documentation for the STACKIT Postgres Flex service
API version: 3alpha1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package postgresflexalpha
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"`
// REQUIRED
Size PaginationGetSizeAttributeType `json:"size" required:"true"`
// REQUIRED
Sort PaginationGetSortAttributeType `json:"sort" required:"true"`
// REQUIRED
TotalPages PaginationGetTotalPagesAttributeType `json:"totalPages" required:"true"`
// REQUIRED
TotalRows PaginationGetTotalRowsAttributeType `json:"totalRows" required:"true"`
}
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)
}