This repository has been archived on 2025-02-01. You can view files and clone it, but cannot push or open issues or pull requests.
eve-goclient/client/user_interface/post_ui_autopilot_waypoint_parameters.go

221 lines
6.8 KiB
Go

package user_interface
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"time"
"golang.org/x/net/context"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/swag"
strfmt "github.com/go-openapi/strfmt"
)
// NewPostUIAutopilotWaypointParams creates a new PostUIAutopilotWaypointParams object
// with the default values initialized.
func NewPostUIAutopilotWaypointParams() *PostUIAutopilotWaypointParams {
var (
addToBeginningDefault = bool(false)
clearOtherWaypointsDefault = bool(false)
datasourceDefault = string("tranquility")
)
return &PostUIAutopilotWaypointParams{
AddToBeginning: addToBeginningDefault,
ClearOtherWaypoints: clearOtherWaypointsDefault,
Datasource: &datasourceDefault,
timeout: cr.DefaultTimeout,
}
}
// NewPostUIAutopilotWaypointParamsWithTimeout creates a new PostUIAutopilotWaypointParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewPostUIAutopilotWaypointParamsWithTimeout(timeout time.Duration) *PostUIAutopilotWaypointParams {
var (
addToBeginningDefault = bool(false)
clearOtherWaypointsDefault = bool(false)
datasourceDefault = string("tranquility")
)
return &PostUIAutopilotWaypointParams{
AddToBeginning: addToBeginningDefault,
ClearOtherWaypoints: clearOtherWaypointsDefault,
Datasource: &datasourceDefault,
timeout: timeout,
}
}
// NewPostUIAutopilotWaypointParamsWithContext creates a new PostUIAutopilotWaypointParams object
// with the default values initialized, and the ability to set a context for a request
func NewPostUIAutopilotWaypointParamsWithContext(ctx context.Context) *PostUIAutopilotWaypointParams {
var (
addToBeginningDefault = bool(false)
clearOtherWaypointsDefault = bool(false)
datasourceDefault = string("tranquility")
)
return &PostUIAutopilotWaypointParams{
AddToBeginning: addToBeginningDefault,
ClearOtherWaypoints: clearOtherWaypointsDefault,
Datasource: &datasourceDefault,
Context: ctx,
}
}
/*PostUIAutopilotWaypointParams contains all the parameters to send to the API endpoint
for the post ui autopilot waypoint operation typically these are written to a http.Request
*/
type PostUIAutopilotWaypointParams struct {
/*AddToBeginning
Whether this solar system should be added to the beginning of all waypoints
*/
AddToBeginning bool
/*ClearOtherWaypoints
Whether clean other waypoints beforing adding this one
*/
ClearOtherWaypoints bool
/*Datasource
The server name you would like data from
*/
Datasource *string
/*DestinationID
The destination to travel to, can be solar system, station or structure's id
*/
DestinationID int64
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithTimeout adds the timeout to the post ui autopilot waypoint params
func (o *PostUIAutopilotWaypointParams) WithTimeout(timeout time.Duration) *PostUIAutopilotWaypointParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the post ui autopilot waypoint params
func (o *PostUIAutopilotWaypointParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the post ui autopilot waypoint params
func (o *PostUIAutopilotWaypointParams) WithContext(ctx context.Context) *PostUIAutopilotWaypointParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the post ui autopilot waypoint params
func (o *PostUIAutopilotWaypointParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithAddToBeginning adds the addToBeginning to the post ui autopilot waypoint params
func (o *PostUIAutopilotWaypointParams) WithAddToBeginning(addToBeginning bool) *PostUIAutopilotWaypointParams {
o.SetAddToBeginning(addToBeginning)
return o
}
// SetAddToBeginning adds the addToBeginning to the post ui autopilot waypoint params
func (o *PostUIAutopilotWaypointParams) SetAddToBeginning(addToBeginning bool) {
o.AddToBeginning = addToBeginning
}
// WithClearOtherWaypoints adds the clearOtherWaypoints to the post ui autopilot waypoint params
func (o *PostUIAutopilotWaypointParams) WithClearOtherWaypoints(clearOtherWaypoints bool) *PostUIAutopilotWaypointParams {
o.SetClearOtherWaypoints(clearOtherWaypoints)
return o
}
// SetClearOtherWaypoints adds the clearOtherWaypoints to the post ui autopilot waypoint params
func (o *PostUIAutopilotWaypointParams) SetClearOtherWaypoints(clearOtherWaypoints bool) {
o.ClearOtherWaypoints = clearOtherWaypoints
}
// WithDatasource adds the datasource to the post ui autopilot waypoint params
func (o *PostUIAutopilotWaypointParams) WithDatasource(datasource *string) *PostUIAutopilotWaypointParams {
o.SetDatasource(datasource)
return o
}
// SetDatasource adds the datasource to the post ui autopilot waypoint params
func (o *PostUIAutopilotWaypointParams) SetDatasource(datasource *string) {
o.Datasource = datasource
}
// WithDestinationID adds the destinationID to the post ui autopilot waypoint params
func (o *PostUIAutopilotWaypointParams) WithDestinationID(destinationID int64) *PostUIAutopilotWaypointParams {
o.SetDestinationID(destinationID)
return o
}
// SetDestinationID adds the destinationId to the post ui autopilot waypoint params
func (o *PostUIAutopilotWaypointParams) SetDestinationID(destinationID int64) {
o.DestinationID = destinationID
}
// WriteToRequest writes these params to a swagger request
func (o *PostUIAutopilotWaypointParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
r.SetTimeout(o.timeout)
var res []error
// query param add_to_beginning
qrAddToBeginning := o.AddToBeginning
qAddToBeginning := swag.FormatBool(qrAddToBeginning)
if qAddToBeginning != "" {
if err := r.SetQueryParam("add_to_beginning", qAddToBeginning); err != nil {
return err
}
}
// query param clear_other_waypoints
qrClearOtherWaypoints := o.ClearOtherWaypoints
qClearOtherWaypoints := swag.FormatBool(qrClearOtherWaypoints)
if qClearOtherWaypoints != "" {
if err := r.SetQueryParam("clear_other_waypoints", qClearOtherWaypoints); err != nil {
return err
}
}
if o.Datasource != nil {
// query param datasource
var qrDatasource string
if o.Datasource != nil {
qrDatasource = *o.Datasource
}
qDatasource := qrDatasource
if qDatasource != "" {
if err := r.SetQueryParam("datasource", qDatasource); err != nil {
return err
}
}
}
// query param destination_id
qrDestinationID := o.DestinationID
qDestinationID := swag.FormatInt64(qrDestinationID)
if qDestinationID != "" {
if err := r.SetQueryParam("destination_id", qDestinationID); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}