mirror of
https://github.com/openziti/zrok.git
synced 2025-08-18 11:49:51 +02:00
support for 'patch' access (frontend) to update description (for bind address) (#834)
This commit is contained in:
146
rest_client_zrok/share/update_access_parameters.go
Normal file
146
rest_client_zrok/share/update_access_parameters.go
Normal file
@@ -0,0 +1,146 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package share
|
||||
|
||||
// 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"
|
||||
)
|
||||
|
||||
// NewUpdateAccessParams creates a new UpdateAccessParams 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 NewUpdateAccessParams() *UpdateAccessParams {
|
||||
return &UpdateAccessParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewUpdateAccessParamsWithTimeout creates a new UpdateAccessParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewUpdateAccessParamsWithTimeout(timeout time.Duration) *UpdateAccessParams {
|
||||
return &UpdateAccessParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewUpdateAccessParamsWithContext creates a new UpdateAccessParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewUpdateAccessParamsWithContext(ctx context.Context) *UpdateAccessParams {
|
||||
return &UpdateAccessParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewUpdateAccessParamsWithHTTPClient creates a new UpdateAccessParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewUpdateAccessParamsWithHTTPClient(client *http.Client) *UpdateAccessParams {
|
||||
return &UpdateAccessParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
UpdateAccessParams contains all the parameters to send to the API endpoint
|
||||
|
||||
for the update access operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type UpdateAccessParams struct {
|
||||
|
||||
// Body.
|
||||
Body UpdateAccessBody
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the update access params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *UpdateAccessParams) WithDefaults() *UpdateAccessParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the update access params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *UpdateAccessParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the update access params
|
||||
func (o *UpdateAccessParams) WithTimeout(timeout time.Duration) *UpdateAccessParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the update access params
|
||||
func (o *UpdateAccessParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the update access params
|
||||
func (o *UpdateAccessParams) WithContext(ctx context.Context) *UpdateAccessParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the update access params
|
||||
func (o *UpdateAccessParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the update access params
|
||||
func (o *UpdateAccessParams) WithHTTPClient(client *http.Client) *UpdateAccessParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the update access params
|
||||
func (o *UpdateAccessParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithBody adds the body to the update access params
|
||||
func (o *UpdateAccessParams) WithBody(body UpdateAccessBody) *UpdateAccessParams {
|
||||
o.SetBody(body)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetBody adds the body to the update access params
|
||||
func (o *UpdateAccessParams) SetBody(body UpdateAccessBody) {
|
||||
o.Body = body
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *UpdateAccessParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if err := r.SetBodyParam(o.Body); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user