// Code generated by go-swagger; DO NOT EDIT.

package wars

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"github.com/go-openapi/runtime"

	strfmt "github.com/go-openapi/strfmt"
)

// New creates a new wars API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
	return &Client{transport: transport, formats: formats}
}

/*
Client for wars API
*/
type Client struct {
	transport runtime.ClientTransport
	formats   strfmt.Registry
}

/*
GetWars lists wars

Return a list of wars

---
Alternate route: `/v1/wars/`

Alternate route: `/legacy/wars/`

Alternate route: `/dev/wars/`

---
This route is cached for up to 3600 seconds
*/
func (a *Client) GetWars(params *GetWarsParams) (*GetWarsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewGetWarsParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "get_wars",
		Method:             "GET",
		PathPattern:        "/wars/",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{""},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &GetWarsReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*GetWarsOK), nil

}

/*
GetWarsWarID gets war information

Return details about a war

---
Alternate route: `/v1/wars/{war_id}/`

Alternate route: `/legacy/wars/{war_id}/`

Alternate route: `/dev/wars/{war_id}/`

---
This route is cached for up to 3600 seconds
*/
func (a *Client) GetWarsWarID(params *GetWarsWarIDParams) (*GetWarsWarIDOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewGetWarsWarIDParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "get_wars_war_id",
		Method:             "GET",
		PathPattern:        "/wars/{war_id}/",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{""},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &GetWarsWarIDReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*GetWarsWarIDOK), nil

}

/*
GetWarsWarIDKillmails lists kills for a war

Return a list of kills related to a war

---
Alternate route: `/v1/wars/{war_id}/killmails/`

Alternate route: `/legacy/wars/{war_id}/killmails/`

Alternate route: `/dev/wars/{war_id}/killmails/`

---
This route is cached for up to 3600 seconds
*/
func (a *Client) GetWarsWarIDKillmails(params *GetWarsWarIDKillmailsParams) (*GetWarsWarIDKillmailsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewGetWarsWarIDKillmailsParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "get_wars_war_id_killmails",
		Method:             "GET",
		PathPattern:        "/wars/{war_id}/killmails/",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{""},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &GetWarsWarIDKillmailsReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*GetWarsWarIDKillmailsOK), nil

}

// SetTransport changes the transport on the client
func (a *Client) SetTransport(transport runtime.ClientTransport) {
	a.transport = transport
}
