mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-10-19 07:55:07 +00:00
152 lines
4.9 KiB
Go
152 lines
4.9 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"
|
|
)
|
|
|
|
// NewRevokeAuthenticationSessionParams creates a new RevokeAuthenticationSessionParams 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 NewRevokeAuthenticationSessionParams() *RevokeAuthenticationSessionParams {
|
|
return &RevokeAuthenticationSessionParams{
|
|
timeout: cr.DefaultTimeout,
|
|
}
|
|
}
|
|
|
|
// NewRevokeAuthenticationSessionParamsWithTimeout creates a new RevokeAuthenticationSessionParams object
|
|
// with the ability to set a timeout on a request.
|
|
func NewRevokeAuthenticationSessionParamsWithTimeout(timeout time.Duration) *RevokeAuthenticationSessionParams {
|
|
return &RevokeAuthenticationSessionParams{
|
|
timeout: timeout,
|
|
}
|
|
}
|
|
|
|
// NewRevokeAuthenticationSessionParamsWithContext creates a new RevokeAuthenticationSessionParams object
|
|
// with the ability to set a context for a request.
|
|
func NewRevokeAuthenticationSessionParamsWithContext(ctx context.Context) *RevokeAuthenticationSessionParams {
|
|
return &RevokeAuthenticationSessionParams{
|
|
Context: ctx,
|
|
}
|
|
}
|
|
|
|
// NewRevokeAuthenticationSessionParamsWithHTTPClient creates a new RevokeAuthenticationSessionParams object
|
|
// with the ability to set a custom HTTPClient for a request.
|
|
func NewRevokeAuthenticationSessionParamsWithHTTPClient(client *http.Client) *RevokeAuthenticationSessionParams {
|
|
return &RevokeAuthenticationSessionParams{
|
|
HTTPClient: client,
|
|
}
|
|
}
|
|
|
|
/* RevokeAuthenticationSessionParams contains all the parameters to send to the API endpoint
|
|
for the revoke authentication session operation.
|
|
|
|
Typically these are written to a http.Request.
|
|
*/
|
|
type RevokeAuthenticationSessionParams struct {
|
|
|
|
// Subject.
|
|
Subject string
|
|
|
|
timeout time.Duration
|
|
Context context.Context
|
|
HTTPClient *http.Client
|
|
}
|
|
|
|
// WithDefaults hydrates default values in the revoke authentication session params (not the query body).
|
|
//
|
|
// All values with no default are reset to their zero value.
|
|
func (o *RevokeAuthenticationSessionParams) WithDefaults() *RevokeAuthenticationSessionParams {
|
|
o.SetDefaults()
|
|
return o
|
|
}
|
|
|
|
// SetDefaults hydrates default values in the revoke authentication session params (not the query body).
|
|
//
|
|
// All values with no default are reset to their zero value.
|
|
func (o *RevokeAuthenticationSessionParams) SetDefaults() {
|
|
// no default values defined for this parameter
|
|
}
|
|
|
|
// WithTimeout adds the timeout to the revoke authentication session params
|
|
func (o *RevokeAuthenticationSessionParams) WithTimeout(timeout time.Duration) *RevokeAuthenticationSessionParams {
|
|
o.SetTimeout(timeout)
|
|
return o
|
|
}
|
|
|
|
// SetTimeout adds the timeout to the revoke authentication session params
|
|
func (o *RevokeAuthenticationSessionParams) SetTimeout(timeout time.Duration) {
|
|
o.timeout = timeout
|
|
}
|
|
|
|
// WithContext adds the context to the revoke authentication session params
|
|
func (o *RevokeAuthenticationSessionParams) WithContext(ctx context.Context) *RevokeAuthenticationSessionParams {
|
|
o.SetContext(ctx)
|
|
return o
|
|
}
|
|
|
|
// SetContext adds the context to the revoke authentication session params
|
|
func (o *RevokeAuthenticationSessionParams) SetContext(ctx context.Context) {
|
|
o.Context = ctx
|
|
}
|
|
|
|
// WithHTTPClient adds the HTTPClient to the revoke authentication session params
|
|
func (o *RevokeAuthenticationSessionParams) WithHTTPClient(client *http.Client) *RevokeAuthenticationSessionParams {
|
|
o.SetHTTPClient(client)
|
|
return o
|
|
}
|
|
|
|
// SetHTTPClient adds the HTTPClient to the revoke authentication session params
|
|
func (o *RevokeAuthenticationSessionParams) SetHTTPClient(client *http.Client) {
|
|
o.HTTPClient = client
|
|
}
|
|
|
|
// WithSubject adds the subject to the revoke authentication session params
|
|
func (o *RevokeAuthenticationSessionParams) WithSubject(subject string) *RevokeAuthenticationSessionParams {
|
|
o.SetSubject(subject)
|
|
return o
|
|
}
|
|
|
|
// SetSubject adds the subject to the revoke authentication session params
|
|
func (o *RevokeAuthenticationSessionParams) SetSubject(subject string) {
|
|
o.Subject = subject
|
|
}
|
|
|
|
// WriteToRequest writes these params to a swagger request
|
|
func (o *RevokeAuthenticationSessionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
|
|
if err := r.SetTimeout(o.timeout); err != nil {
|
|
return err
|
|
}
|
|
var res []error
|
|
|
|
// query param subject
|
|
qrSubject := o.Subject
|
|
qSubject := qrSubject
|
|
if qSubject != "" {
|
|
|
|
if err := r.SetQueryParam("subject", qSubject); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|