mirror of
https://github.com/openziti/ziti.git
synced 2026-09-25 03:42:38 +00:00
160 lines
4.6 KiB
Go
160 lines
4.6 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
//
|
|
// Copyright NetFoundry, Inc.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// https://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
//
|
|
// __ __ _
|
|
// \ \ / / (_)
|
|
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
|
|
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
|
|
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
|
|
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
|
|
// __/ |
|
|
// |___/
|
|
|
|
package api_session
|
|
|
|
// 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"
|
|
)
|
|
|
|
// NewDeleteAPISessionsParams creates a new DeleteAPISessionsParams object
|
|
// with the default values initialized.
|
|
func NewDeleteAPISessionsParams() *DeleteAPISessionsParams {
|
|
var ()
|
|
return &DeleteAPISessionsParams{
|
|
|
|
timeout: cr.DefaultTimeout,
|
|
}
|
|
}
|
|
|
|
// NewDeleteAPISessionsParamsWithTimeout creates a new DeleteAPISessionsParams object
|
|
// with the default values initialized, and the ability to set a timeout on a request
|
|
func NewDeleteAPISessionsParamsWithTimeout(timeout time.Duration) *DeleteAPISessionsParams {
|
|
var ()
|
|
return &DeleteAPISessionsParams{
|
|
|
|
timeout: timeout,
|
|
}
|
|
}
|
|
|
|
// NewDeleteAPISessionsParamsWithContext creates a new DeleteAPISessionsParams object
|
|
// with the default values initialized, and the ability to set a context for a request
|
|
func NewDeleteAPISessionsParamsWithContext(ctx context.Context) *DeleteAPISessionsParams {
|
|
var ()
|
|
return &DeleteAPISessionsParams{
|
|
|
|
Context: ctx,
|
|
}
|
|
}
|
|
|
|
// NewDeleteAPISessionsParamsWithHTTPClient creates a new DeleteAPISessionsParams object
|
|
// with the default values initialized, and the ability to set a custom HTTPClient for a request
|
|
func NewDeleteAPISessionsParamsWithHTTPClient(client *http.Client) *DeleteAPISessionsParams {
|
|
var ()
|
|
return &DeleteAPISessionsParams{
|
|
HTTPClient: client,
|
|
}
|
|
}
|
|
|
|
/*DeleteAPISessionsParams contains all the parameters to send to the API endpoint
|
|
for the delete API sessions operation typically these are written to a http.Request
|
|
*/
|
|
type DeleteAPISessionsParams struct {
|
|
|
|
/*ID
|
|
The id of the requested resource
|
|
|
|
*/
|
|
ID string
|
|
|
|
timeout time.Duration
|
|
Context context.Context
|
|
HTTPClient *http.Client
|
|
}
|
|
|
|
// WithTimeout adds the timeout to the delete API sessions params
|
|
func (o *DeleteAPISessionsParams) WithTimeout(timeout time.Duration) *DeleteAPISessionsParams {
|
|
o.SetTimeout(timeout)
|
|
return o
|
|
}
|
|
|
|
// SetTimeout adds the timeout to the delete API sessions params
|
|
func (o *DeleteAPISessionsParams) SetTimeout(timeout time.Duration) {
|
|
o.timeout = timeout
|
|
}
|
|
|
|
// WithContext adds the context to the delete API sessions params
|
|
func (o *DeleteAPISessionsParams) WithContext(ctx context.Context) *DeleteAPISessionsParams {
|
|
o.SetContext(ctx)
|
|
return o
|
|
}
|
|
|
|
// SetContext adds the context to the delete API sessions params
|
|
func (o *DeleteAPISessionsParams) SetContext(ctx context.Context) {
|
|
o.Context = ctx
|
|
}
|
|
|
|
// WithHTTPClient adds the HTTPClient to the delete API sessions params
|
|
func (o *DeleteAPISessionsParams) WithHTTPClient(client *http.Client) *DeleteAPISessionsParams {
|
|
o.SetHTTPClient(client)
|
|
return o
|
|
}
|
|
|
|
// SetHTTPClient adds the HTTPClient to the delete API sessions params
|
|
func (o *DeleteAPISessionsParams) SetHTTPClient(client *http.Client) {
|
|
o.HTTPClient = client
|
|
}
|
|
|
|
// WithID adds the id to the delete API sessions params
|
|
func (o *DeleteAPISessionsParams) WithID(id string) *DeleteAPISessionsParams {
|
|
o.SetID(id)
|
|
return o
|
|
}
|
|
|
|
// SetID adds the id to the delete API sessions params
|
|
func (o *DeleteAPISessionsParams) SetID(id string) {
|
|
o.ID = id
|
|
}
|
|
|
|
// WriteToRequest writes these params to a swagger request
|
|
func (o *DeleteAPISessionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
|
|
if err := r.SetTimeout(o.timeout); err != nil {
|
|
return err
|
|
}
|
|
var res []error
|
|
|
|
// path param id
|
|
if err := r.SetPathParam("id", o.ID); err != nil {
|
|
return err
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|