230 lines
5.7 KiB
Go
230 lines
5.7 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package kiosk
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"context"
|
|
"net/http"
|
|
"time"
|
|
|
|
"github.com/go-openapi/errors"
|
|
"github.com/go-openapi/runtime"
|
|
cr "github.com/go-openapi/runtime/client"
|
|
"github.com/go-openapi/strfmt"
|
|
)
|
|
|
|
// NewGetAPIKiosksParams creates a new GetAPIKiosksParams object,
|
|
// with the default timeout for this client.
|
|
//
|
|
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
|
//
|
|
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
|
func NewGetAPIKiosksParams() *GetAPIKiosksParams {
|
|
return &GetAPIKiosksParams{
|
|
timeout: cr.DefaultTimeout,
|
|
}
|
|
}
|
|
|
|
// NewGetAPIKiosksParamsWithTimeout creates a new GetAPIKiosksParams object
|
|
// with the ability to set a timeout on a request.
|
|
func NewGetAPIKiosksParamsWithTimeout(timeout time.Duration) *GetAPIKiosksParams {
|
|
return &GetAPIKiosksParams{
|
|
timeout: timeout,
|
|
}
|
|
}
|
|
|
|
// NewGetAPIKiosksParamsWithContext creates a new GetAPIKiosksParams object
|
|
// with the ability to set a context for a request.
|
|
func NewGetAPIKiosksParamsWithContext(ctx context.Context) *GetAPIKiosksParams {
|
|
return &GetAPIKiosksParams{
|
|
Context: ctx,
|
|
}
|
|
}
|
|
|
|
// NewGetAPIKiosksParamsWithHTTPClient creates a new GetAPIKiosksParams object
|
|
// with the ability to set a custom HTTPClient for a request.
|
|
func NewGetAPIKiosksParamsWithHTTPClient(client *http.Client) *GetAPIKiosksParams {
|
|
return &GetAPIKiosksParams{
|
|
HTTPClient: client,
|
|
}
|
|
}
|
|
|
|
/*
|
|
GetAPIKiosksParams contains all the parameters to send to the API endpoint
|
|
|
|
for the get API kiosks operation.
|
|
|
|
Typically these are written to a http.Request.
|
|
*/
|
|
type GetAPIKiosksParams struct {
|
|
|
|
/* Order.
|
|
|
|
The result order. Allowed values: ASC, DESC (default: DESC)
|
|
*/
|
|
Order string
|
|
|
|
/* OrderBy.
|
|
|
|
The field by which results will be ordered. Allowed values: id, user, type, code (default: id)
|
|
*/
|
|
OrderBy string
|
|
|
|
/* Page.
|
|
|
|
The page to display, renders a 404 if not found (default: 1)
|
|
*/
|
|
Page string
|
|
|
|
/* Size.
|
|
|
|
The amount of entries for each page (default: 50)
|
|
*/
|
|
Size string
|
|
|
|
timeout time.Duration
|
|
Context context.Context
|
|
HTTPClient *http.Client
|
|
}
|
|
|
|
// WithDefaults hydrates default values in the get API kiosks params (not the query body).
|
|
//
|
|
// All values with no default are reset to their zero value.
|
|
func (o *GetAPIKiosksParams) WithDefaults() *GetAPIKiosksParams {
|
|
o.SetDefaults()
|
|
return o
|
|
}
|
|
|
|
// SetDefaults hydrates default values in the get API kiosks params (not the query body).
|
|
//
|
|
// All values with no default are reset to their zero value.
|
|
func (o *GetAPIKiosksParams) SetDefaults() {
|
|
// no default values defined for this parameter
|
|
}
|
|
|
|
// WithTimeout adds the timeout to the get API kiosks params
|
|
func (o *GetAPIKiosksParams) WithTimeout(timeout time.Duration) *GetAPIKiosksParams {
|
|
o.SetTimeout(timeout)
|
|
return o
|
|
}
|
|
|
|
// SetTimeout adds the timeout to the get API kiosks params
|
|
func (o *GetAPIKiosksParams) SetTimeout(timeout time.Duration) {
|
|
o.timeout = timeout
|
|
}
|
|
|
|
// WithContext adds the context to the get API kiosks params
|
|
func (o *GetAPIKiosksParams) WithContext(ctx context.Context) *GetAPIKiosksParams {
|
|
o.SetContext(ctx)
|
|
return o
|
|
}
|
|
|
|
// SetContext adds the context to the get API kiosks params
|
|
func (o *GetAPIKiosksParams) SetContext(ctx context.Context) {
|
|
o.Context = ctx
|
|
}
|
|
|
|
// WithHTTPClient adds the HTTPClient to the get API kiosks params
|
|
func (o *GetAPIKiosksParams) WithHTTPClient(client *http.Client) *GetAPIKiosksParams {
|
|
o.SetHTTPClient(client)
|
|
return o
|
|
}
|
|
|
|
// SetHTTPClient adds the HTTPClient to the get API kiosks params
|
|
func (o *GetAPIKiosksParams) SetHTTPClient(client *http.Client) {
|
|
o.HTTPClient = client
|
|
}
|
|
|
|
// WithOrder adds the order to the get API kiosks params
|
|
func (o *GetAPIKiosksParams) WithOrder(order string) *GetAPIKiosksParams {
|
|
o.SetOrder(order)
|
|
return o
|
|
}
|
|
|
|
// SetOrder adds the order to the get API kiosks params
|
|
func (o *GetAPIKiosksParams) SetOrder(order string) {
|
|
o.Order = order
|
|
}
|
|
|
|
// WithOrderBy adds the orderBy to the get API kiosks params
|
|
func (o *GetAPIKiosksParams) WithOrderBy(orderBy string) *GetAPIKiosksParams {
|
|
o.SetOrderBy(orderBy)
|
|
return o
|
|
}
|
|
|
|
// SetOrderBy adds the orderBy to the get API kiosks params
|
|
func (o *GetAPIKiosksParams) SetOrderBy(orderBy string) {
|
|
o.OrderBy = orderBy
|
|
}
|
|
|
|
// WithPage adds the page to the get API kiosks params
|
|
func (o *GetAPIKiosksParams) WithPage(page string) *GetAPIKiosksParams {
|
|
o.SetPage(page)
|
|
return o
|
|
}
|
|
|
|
// SetPage adds the page to the get API kiosks params
|
|
func (o *GetAPIKiosksParams) SetPage(page string) {
|
|
o.Page = page
|
|
}
|
|
|
|
// WithSize adds the size to the get API kiosks params
|
|
func (o *GetAPIKiosksParams) WithSize(size string) *GetAPIKiosksParams {
|
|
o.SetSize(size)
|
|
return o
|
|
}
|
|
|
|
// SetSize adds the size to the get API kiosks params
|
|
func (o *GetAPIKiosksParams) SetSize(size string) {
|
|
o.Size = size
|
|
}
|
|
|
|
// WriteToRequest writes these params to a swagger request
|
|
func (o *GetAPIKiosksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
|
|
if err := r.SetTimeout(o.timeout); err != nil {
|
|
return err
|
|
}
|
|
var res []error
|
|
|
|
// query param order
|
|
qrOrder := o.Order
|
|
qOrder := qrOrder
|
|
|
|
if err := r.SetQueryParam("order", qOrder); err != nil {
|
|
return err
|
|
}
|
|
|
|
// query param orderBy
|
|
qrOrderBy := o.OrderBy
|
|
qOrderBy := qrOrderBy
|
|
|
|
if err := r.SetQueryParam("orderBy", qOrderBy); err != nil {
|
|
return err
|
|
}
|
|
|
|
// query param page
|
|
qrPage := o.Page
|
|
qPage := qrPage
|
|
|
|
if err := r.SetQueryParam("page", qPage); err != nil {
|
|
return err
|
|
}
|
|
|
|
// query param size
|
|
qrSize := o.Size
|
|
qSize := qrSize
|
|
|
|
if err := r.SetQueryParam("size", qSize); err != nil {
|
|
return err
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|