155 lines
4.6 KiB
Go
155 lines
4.6 KiB
Go
package clones
|
|
|
|
// 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"
|
|
)
|
|
|
|
// NewGetCharactersCharacterIDClonesParams creates a new GetCharactersCharacterIDClonesParams object
|
|
// with the default values initialized.
|
|
func NewGetCharactersCharacterIDClonesParams() *GetCharactersCharacterIDClonesParams {
|
|
var (
|
|
datasourceDefault = string("tranquility")
|
|
)
|
|
return &GetCharactersCharacterIDClonesParams{
|
|
Datasource: &datasourceDefault,
|
|
|
|
timeout: cr.DefaultTimeout,
|
|
}
|
|
}
|
|
|
|
// NewGetCharactersCharacterIDClonesParamsWithTimeout creates a new GetCharactersCharacterIDClonesParams object
|
|
// with the default values initialized, and the ability to set a timeout on a request
|
|
func NewGetCharactersCharacterIDClonesParamsWithTimeout(timeout time.Duration) *GetCharactersCharacterIDClonesParams {
|
|
var (
|
|
datasourceDefault = string("tranquility")
|
|
)
|
|
return &GetCharactersCharacterIDClonesParams{
|
|
Datasource: &datasourceDefault,
|
|
|
|
timeout: timeout,
|
|
}
|
|
}
|
|
|
|
// NewGetCharactersCharacterIDClonesParamsWithContext creates a new GetCharactersCharacterIDClonesParams object
|
|
// with the default values initialized, and the ability to set a context for a request
|
|
func NewGetCharactersCharacterIDClonesParamsWithContext(ctx context.Context) *GetCharactersCharacterIDClonesParams {
|
|
var (
|
|
datasourceDefault = string("tranquility")
|
|
)
|
|
return &GetCharactersCharacterIDClonesParams{
|
|
Datasource: &datasourceDefault,
|
|
|
|
Context: ctx,
|
|
}
|
|
}
|
|
|
|
/*GetCharactersCharacterIDClonesParams contains all the parameters to send to the API endpoint
|
|
for the get characters character id clones operation typically these are written to a http.Request
|
|
*/
|
|
type GetCharactersCharacterIDClonesParams struct {
|
|
|
|
/*CharacterID
|
|
An EVE character ID
|
|
|
|
*/
|
|
CharacterID int32
|
|
/*Datasource
|
|
The server name you would like data from
|
|
|
|
*/
|
|
Datasource *string
|
|
|
|
timeout time.Duration
|
|
Context context.Context
|
|
HTTPClient *http.Client
|
|
}
|
|
|
|
// WithTimeout adds the timeout to the get characters character id clones params
|
|
func (o *GetCharactersCharacterIDClonesParams) WithTimeout(timeout time.Duration) *GetCharactersCharacterIDClonesParams {
|
|
o.SetTimeout(timeout)
|
|
return o
|
|
}
|
|
|
|
// SetTimeout adds the timeout to the get characters character id clones params
|
|
func (o *GetCharactersCharacterIDClonesParams) SetTimeout(timeout time.Duration) {
|
|
o.timeout = timeout
|
|
}
|
|
|
|
// WithContext adds the context to the get characters character id clones params
|
|
func (o *GetCharactersCharacterIDClonesParams) WithContext(ctx context.Context) *GetCharactersCharacterIDClonesParams {
|
|
o.SetContext(ctx)
|
|
return o
|
|
}
|
|
|
|
// SetContext adds the context to the get characters character id clones params
|
|
func (o *GetCharactersCharacterIDClonesParams) SetContext(ctx context.Context) {
|
|
o.Context = ctx
|
|
}
|
|
|
|
// WithCharacterID adds the characterID to the get characters character id clones params
|
|
func (o *GetCharactersCharacterIDClonesParams) WithCharacterID(characterID int32) *GetCharactersCharacterIDClonesParams {
|
|
o.SetCharacterID(characterID)
|
|
return o
|
|
}
|
|
|
|
// SetCharacterID adds the characterId to the get characters character id clones params
|
|
func (o *GetCharactersCharacterIDClonesParams) SetCharacterID(characterID int32) {
|
|
o.CharacterID = characterID
|
|
}
|
|
|
|
// WithDatasource adds the datasource to the get characters character id clones params
|
|
func (o *GetCharactersCharacterIDClonesParams) WithDatasource(datasource *string) *GetCharactersCharacterIDClonesParams {
|
|
o.SetDatasource(datasource)
|
|
return o
|
|
}
|
|
|
|
// SetDatasource adds the datasource to the get characters character id clones params
|
|
func (o *GetCharactersCharacterIDClonesParams) SetDatasource(datasource *string) {
|
|
o.Datasource = datasource
|
|
}
|
|
|
|
// WriteToRequest writes these params to a swagger request
|
|
func (o *GetCharactersCharacterIDClonesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
|
|
r.SetTimeout(o.timeout)
|
|
var res []error
|
|
|
|
// path param character_id
|
|
if err := r.SetPathParam("character_id", swag.FormatInt32(o.CharacterID)); 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
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|