mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-10-19 07:55:07 +00:00
152 lines
4.6 KiB
Go
152 lines
4.6 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package admin
|
|
|
|
// 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"
|
|
)
|
|
|
|
// NewAcceptLogoutRequestParams creates a new AcceptLogoutRequestParams 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 NewAcceptLogoutRequestParams() *AcceptLogoutRequestParams {
|
|
return &AcceptLogoutRequestParams{
|
|
timeout: cr.DefaultTimeout,
|
|
}
|
|
}
|
|
|
|
// NewAcceptLogoutRequestParamsWithTimeout creates a new AcceptLogoutRequestParams object
|
|
// with the ability to set a timeout on a request.
|
|
func NewAcceptLogoutRequestParamsWithTimeout(timeout time.Duration) *AcceptLogoutRequestParams {
|
|
return &AcceptLogoutRequestParams{
|
|
timeout: timeout,
|
|
}
|
|
}
|
|
|
|
// NewAcceptLogoutRequestParamsWithContext creates a new AcceptLogoutRequestParams object
|
|
// with the ability to set a context for a request.
|
|
func NewAcceptLogoutRequestParamsWithContext(ctx context.Context) *AcceptLogoutRequestParams {
|
|
return &AcceptLogoutRequestParams{
|
|
Context: ctx,
|
|
}
|
|
}
|
|
|
|
// NewAcceptLogoutRequestParamsWithHTTPClient creates a new AcceptLogoutRequestParams object
|
|
// with the ability to set a custom HTTPClient for a request.
|
|
func NewAcceptLogoutRequestParamsWithHTTPClient(client *http.Client) *AcceptLogoutRequestParams {
|
|
return &AcceptLogoutRequestParams{
|
|
HTTPClient: client,
|
|
}
|
|
}
|
|
|
|
/* AcceptLogoutRequestParams contains all the parameters to send to the API endpoint
|
|
for the accept logout request operation.
|
|
|
|
Typically these are written to a http.Request.
|
|
*/
|
|
type AcceptLogoutRequestParams struct {
|
|
|
|
// LogoutChallenge.
|
|
LogoutChallenge string
|
|
|
|
timeout time.Duration
|
|
Context context.Context
|
|
HTTPClient *http.Client
|
|
}
|
|
|
|
// WithDefaults hydrates default values in the accept logout request params (not the query body).
|
|
//
|
|
// All values with no default are reset to their zero value.
|
|
func (o *AcceptLogoutRequestParams) WithDefaults() *AcceptLogoutRequestParams {
|
|
o.SetDefaults()
|
|
return o
|
|
}
|
|
|
|
// SetDefaults hydrates default values in the accept logout request params (not the query body).
|
|
//
|
|
// All values with no default are reset to their zero value.
|
|
func (o *AcceptLogoutRequestParams) SetDefaults() {
|
|
// no default values defined for this parameter
|
|
}
|
|
|
|
// WithTimeout adds the timeout to the accept logout request params
|
|
func (o *AcceptLogoutRequestParams) WithTimeout(timeout time.Duration) *AcceptLogoutRequestParams {
|
|
o.SetTimeout(timeout)
|
|
return o
|
|
}
|
|
|
|
// SetTimeout adds the timeout to the accept logout request params
|
|
func (o *AcceptLogoutRequestParams) SetTimeout(timeout time.Duration) {
|
|
o.timeout = timeout
|
|
}
|
|
|
|
// WithContext adds the context to the accept logout request params
|
|
func (o *AcceptLogoutRequestParams) WithContext(ctx context.Context) *AcceptLogoutRequestParams {
|
|
o.SetContext(ctx)
|
|
return o
|
|
}
|
|
|
|
// SetContext adds the context to the accept logout request params
|
|
func (o *AcceptLogoutRequestParams) SetContext(ctx context.Context) {
|
|
o.Context = ctx
|
|
}
|
|
|
|
// WithHTTPClient adds the HTTPClient to the accept logout request params
|
|
func (o *AcceptLogoutRequestParams) WithHTTPClient(client *http.Client) *AcceptLogoutRequestParams {
|
|
o.SetHTTPClient(client)
|
|
return o
|
|
}
|
|
|
|
// SetHTTPClient adds the HTTPClient to the accept logout request params
|
|
func (o *AcceptLogoutRequestParams) SetHTTPClient(client *http.Client) {
|
|
o.HTTPClient = client
|
|
}
|
|
|
|
// WithLogoutChallenge adds the logoutChallenge to the accept logout request params
|
|
func (o *AcceptLogoutRequestParams) WithLogoutChallenge(logoutChallenge string) *AcceptLogoutRequestParams {
|
|
o.SetLogoutChallenge(logoutChallenge)
|
|
return o
|
|
}
|
|
|
|
// SetLogoutChallenge adds the logoutChallenge to the accept logout request params
|
|
func (o *AcceptLogoutRequestParams) SetLogoutChallenge(logoutChallenge string) {
|
|
o.LogoutChallenge = logoutChallenge
|
|
}
|
|
|
|
// WriteToRequest writes these params to a swagger request
|
|
func (o *AcceptLogoutRequestParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
|
|
if err := r.SetTimeout(o.timeout); err != nil {
|
|
return err
|
|
}
|
|
var res []error
|
|
|
|
// query param logout_challenge
|
|
qrLogoutChallenge := o.LogoutChallenge
|
|
qLogoutChallenge := qrLogoutChallenge
|
|
if qLogoutChallenge != "" {
|
|
|
|
if err := r.SetQueryParam("logout_challenge", qLogoutChallenge); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|