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.64 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"
)
// NewCreateSiteBuildParams creates a new CreateSiteBuildParams object
// with the default values initialized.
func NewCreateSiteBuildParams() *CreateSiteBuildParams {
var ()
return &CreateSiteBuildParams{
timeout: cr.DefaultTimeout,
}
}
// NewCreateSiteBuildParamsWithTimeout creates a new CreateSiteBuildParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewCreateSiteBuildParamsWithTimeout(timeout time.Duration) *CreateSiteBuildParams {
var ()
return &CreateSiteBuildParams{
timeout: timeout,
}
}
// NewCreateSiteBuildParamsWithContext creates a new CreateSiteBuildParams object
// with the default values initialized, and the ability to set a context for a request
func NewCreateSiteBuildParamsWithContext(ctx context.Context) *CreateSiteBuildParams {
var ()
return &CreateSiteBuildParams{
Context: ctx,
}
}
// NewCreateSiteBuildParamsWithHTTPClient creates a new CreateSiteBuildParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewCreateSiteBuildParamsWithHTTPClient(client *http.Client) *CreateSiteBuildParams {
var ()
return &CreateSiteBuildParams{
HTTPClient: client,
}
}
/*CreateSiteBuildParams contains all the parameters to send to the API endpoint
for the create site build operation typically these are written to a http.Request
*/
type CreateSiteBuildParams struct {
/*SiteID*/
SiteID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithTimeout adds the timeout to the create site build params
func (o *CreateSiteBuildParams) WithTimeout(timeout time.Duration) *CreateSiteBuildParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the create site build params
func (o *CreateSiteBuildParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the create site build params
func (o *CreateSiteBuildParams) WithContext(ctx context.Context) *CreateSiteBuildParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the create site build params
func (o *CreateSiteBuildParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the create site build params
func (o *CreateSiteBuildParams) WithHTTPClient(client *http.Client) *CreateSiteBuildParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the create site build params
func (o *CreateSiteBuildParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithSiteID adds the siteID to the create site build params
func (o *CreateSiteBuildParams) WithSiteID(siteID string) *CreateSiteBuildParams {
o.SetSiteID(siteID)
return o
}
// SetSiteID adds the siteId to the create site build params
func (o *CreateSiteBuildParams) SetSiteID(siteID string) {
o.SiteID = siteID
}
// WriteToRequest writes these params to a swagger request
func (o *CreateSiteBuildParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param site_id
if err := r.SetPathParam("site_id", o.SiteID); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
You can’t perform that action at this time.