Initial cloud-services repo - gateway service + pkg modules
This commit is contained in:
164
pkg/ota_api/client/operations/delete_manifest_parameters.go
Normal file
164
pkg/ota_api/client/operations/delete_manifest_parameters.go
Normal file
@@ -0,0 +1,164 @@
|
||||
// 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"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// NewDeleteManifestParams creates a new DeleteManifestParams 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 NewDeleteManifestParams() *DeleteManifestParams {
|
||||
return &DeleteManifestParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewDeleteManifestParamsWithTimeout creates a new DeleteManifestParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewDeleteManifestParamsWithTimeout(timeout time.Duration) *DeleteManifestParams {
|
||||
return &DeleteManifestParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewDeleteManifestParamsWithContext creates a new DeleteManifestParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewDeleteManifestParamsWithContext(ctx context.Context) *DeleteManifestParams {
|
||||
return &DeleteManifestParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewDeleteManifestParamsWithHTTPClient creates a new DeleteManifestParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewDeleteManifestParamsWithHTTPClient(client *http.Client) *DeleteManifestParams {
|
||||
return &DeleteManifestParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
DeleteManifestParams contains all the parameters to send to the API endpoint
|
||||
|
||||
for the delete manifest operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type DeleteManifestParams struct {
|
||||
|
||||
/* ID.
|
||||
|
||||
Update manifest id
|
||||
*/
|
||||
ID *int64
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the delete manifest params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *DeleteManifestParams) WithDefaults() *DeleteManifestParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the delete manifest params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *DeleteManifestParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the delete manifest params
|
||||
func (o *DeleteManifestParams) WithTimeout(timeout time.Duration) *DeleteManifestParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the delete manifest params
|
||||
func (o *DeleteManifestParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the delete manifest params
|
||||
func (o *DeleteManifestParams) WithContext(ctx context.Context) *DeleteManifestParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the delete manifest params
|
||||
func (o *DeleteManifestParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the delete manifest params
|
||||
func (o *DeleteManifestParams) WithHTTPClient(client *http.Client) *DeleteManifestParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the delete manifest params
|
||||
func (o *DeleteManifestParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithID adds the id to the delete manifest params
|
||||
func (o *DeleteManifestParams) WithID(id *int64) *DeleteManifestParams {
|
||||
o.SetID(id)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetID adds the id to the delete manifest params
|
||||
func (o *DeleteManifestParams) SetID(id *int64) {
|
||||
o.ID = id
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *DeleteManifestParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
if o.ID != nil {
|
||||
|
||||
// query param id
|
||||
var qrID int64
|
||||
|
||||
if o.ID != nil {
|
||||
qrID = *o.ID
|
||||
}
|
||||
qID := swag.FormatInt64(qrID)
|
||||
if qID != "" {
|
||||
|
||||
if err := r.SetQueryParam("id", qID); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user