Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
133 lines (106 sloc) 3.63 KB
// Code generated by go-swagger; DO NOT EDIT.
package operations
// 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"
strfmt "github.com/go-openapi/strfmt"
)
// NewDeleteDeployKeyParams creates a new DeleteDeployKeyParams object
// with the default values initialized.
func NewDeleteDeployKeyParams() *DeleteDeployKeyParams {
var ()
return &DeleteDeployKeyParams{
timeout: cr.DefaultTimeout,
}
}
// NewDeleteDeployKeyParamsWithTimeout creates a new DeleteDeployKeyParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewDeleteDeployKeyParamsWithTimeout(timeout time.Duration) *DeleteDeployKeyParams {
var ()
return &DeleteDeployKeyParams{
timeout: timeout,
}
}
// NewDeleteDeployKeyParamsWithContext creates a new DeleteDeployKeyParams object
// with the default values initialized, and the ability to set a context for a request
func NewDeleteDeployKeyParamsWithContext(ctx context.Context) *DeleteDeployKeyParams {
var ()
return &DeleteDeployKeyParams{
Context: ctx,
}
}
// NewDeleteDeployKeyParamsWithHTTPClient creates a new DeleteDeployKeyParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewDeleteDeployKeyParamsWithHTTPClient(client *http.Client) *DeleteDeployKeyParams {
var ()
return &DeleteDeployKeyParams{
HTTPClient: client,
}
}
/*DeleteDeployKeyParams contains all the parameters to send to the API endpoint
for the delete deploy key operation typically these are written to a http.Request
*/
type DeleteDeployKeyParams struct {
/*KeyID*/
KeyID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithTimeout adds the timeout to the delete deploy key params
func (o *DeleteDeployKeyParams) WithTimeout(timeout time.Duration) *DeleteDeployKeyParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the delete deploy key params
func (o *DeleteDeployKeyParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the delete deploy key params
func (o *DeleteDeployKeyParams) WithContext(ctx context.Context) *DeleteDeployKeyParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the delete deploy key params
func (o *DeleteDeployKeyParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the delete deploy key params
func (o *DeleteDeployKeyParams) WithHTTPClient(client *http.Client) *DeleteDeployKeyParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the delete deploy key params
func (o *DeleteDeployKeyParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithKeyID adds the keyID to the delete deploy key params
func (o *DeleteDeployKeyParams) WithKeyID(keyID string) *DeleteDeployKeyParams {
o.SetKeyID(keyID)
return o
}
// SetKeyID adds the keyId to the delete deploy key params
func (o *DeleteDeployKeyParams) SetKeyID(keyID string) {
o.KeyID = keyID
}
// WriteToRequest writes these params to a swagger request
func (o *DeleteDeployKeyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param key_id
if err := r.SetPathParam("key_id", o.KeyID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
You can’t perform that action at this time.