158 lines
4.7 KiB
Go
158 lines
4.7 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
// (c) 2012-2023 by Vernon Keenan
|
|
// All rights reserved worldwide.
|
|
// Proprietary product; unlicensed use is not allowed
|
|
|
|
package certificates
|
|
|
|
// 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"
|
|
|
|
"code.tnxs.net/work/lib/api/members/members_models"
|
|
)
|
|
|
|
// NewPutCertificatesParams creates a new PutCertificatesParams 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 NewPutCertificatesParams() *PutCertificatesParams {
|
|
return &PutCertificatesParams{
|
|
timeout: cr.DefaultTimeout,
|
|
}
|
|
}
|
|
|
|
// NewPutCertificatesParamsWithTimeout creates a new PutCertificatesParams object
|
|
// with the ability to set a timeout on a request.
|
|
func NewPutCertificatesParamsWithTimeout(timeout time.Duration) *PutCertificatesParams {
|
|
return &PutCertificatesParams{
|
|
timeout: timeout,
|
|
}
|
|
}
|
|
|
|
// NewPutCertificatesParamsWithContext creates a new PutCertificatesParams object
|
|
// with the ability to set a context for a request.
|
|
func NewPutCertificatesParamsWithContext(ctx context.Context) *PutCertificatesParams {
|
|
return &PutCertificatesParams{
|
|
Context: ctx,
|
|
}
|
|
}
|
|
|
|
// NewPutCertificatesParamsWithHTTPClient creates a new PutCertificatesParams object
|
|
// with the ability to set a custom HTTPClient for a request.
|
|
func NewPutCertificatesParamsWithHTTPClient(client *http.Client) *PutCertificatesParams {
|
|
return &PutCertificatesParams{
|
|
HTTPClient: client,
|
|
}
|
|
}
|
|
|
|
/*
|
|
PutCertificatesParams contains all the parameters to send to the API endpoint
|
|
|
|
for the put certificates operation.
|
|
|
|
Typically these are written to a http.Request.
|
|
*/
|
|
type PutCertificatesParams struct {
|
|
|
|
/* CertificateRequest.
|
|
|
|
An array of new Certificate records
|
|
*/
|
|
CertificateRequest *members_models.CertificateRequest
|
|
|
|
timeout time.Duration
|
|
Context context.Context
|
|
HTTPClient *http.Client
|
|
}
|
|
|
|
// WithDefaults hydrates default values in the put certificates params (not the query body).
|
|
//
|
|
// All values with no default are reset to their zero value.
|
|
func (o *PutCertificatesParams) WithDefaults() *PutCertificatesParams {
|
|
o.SetDefaults()
|
|
return o
|
|
}
|
|
|
|
// SetDefaults hydrates default values in the put certificates params (not the query body).
|
|
//
|
|
// All values with no default are reset to their zero value.
|
|
func (o *PutCertificatesParams) SetDefaults() {
|
|
// no default values defined for this parameter
|
|
}
|
|
|
|
// WithTimeout adds the timeout to the put certificates params
|
|
func (o *PutCertificatesParams) WithTimeout(timeout time.Duration) *PutCertificatesParams {
|
|
o.SetTimeout(timeout)
|
|
return o
|
|
}
|
|
|
|
// SetTimeout adds the timeout to the put certificates params
|
|
func (o *PutCertificatesParams) SetTimeout(timeout time.Duration) {
|
|
o.timeout = timeout
|
|
}
|
|
|
|
// WithContext adds the context to the put certificates params
|
|
func (o *PutCertificatesParams) WithContext(ctx context.Context) *PutCertificatesParams {
|
|
o.SetContext(ctx)
|
|
return o
|
|
}
|
|
|
|
// SetContext adds the context to the put certificates params
|
|
func (o *PutCertificatesParams) SetContext(ctx context.Context) {
|
|
o.Context = ctx
|
|
}
|
|
|
|
// WithHTTPClient adds the HTTPClient to the put certificates params
|
|
func (o *PutCertificatesParams) WithHTTPClient(client *http.Client) *PutCertificatesParams {
|
|
o.SetHTTPClient(client)
|
|
return o
|
|
}
|
|
|
|
// SetHTTPClient adds the HTTPClient to the put certificates params
|
|
func (o *PutCertificatesParams) SetHTTPClient(client *http.Client) {
|
|
o.HTTPClient = client
|
|
}
|
|
|
|
// WithCertificateRequest adds the certificateRequest to the put certificates params
|
|
func (o *PutCertificatesParams) WithCertificateRequest(certificateRequest *members_models.CertificateRequest) *PutCertificatesParams {
|
|
o.SetCertificateRequest(certificateRequest)
|
|
return o
|
|
}
|
|
|
|
// SetCertificateRequest adds the certificateRequest to the put certificates params
|
|
func (o *PutCertificatesParams) SetCertificateRequest(certificateRequest *members_models.CertificateRequest) {
|
|
o.CertificateRequest = certificateRequest
|
|
}
|
|
|
|
// WriteToRequest writes these params to a swagger request
|
|
func (o *PutCertificatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
|
|
if err := r.SetTimeout(o.timeout); err != nil {
|
|
return err
|
|
}
|
|
var res []error
|
|
if o.CertificateRequest != nil {
|
|
if err := r.SetBodyParam(o.CertificateRequest); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|