283 lines
8.5 KiB
Go
283 lines
8.5 KiB
Go
package contracts
|
||
|
||
// This file was generated by the swagger tool.
|
||
// Editing this file might prove futile when you re-run the swagger generate command
|
||
|
||
import (
|
||
"fmt"
|
||
"io"
|
||
|
||
"github.com/go-openapi/runtime"
|
||
|
||
strfmt "github.com/go-openapi/strfmt"
|
||
|
||
"local/models"
|
||
)
|
||
|
||
// GetCharactersCharacterIDContractsReader is a Reader for the GetCharactersCharacterIDContracts structure.
|
||
type GetCharactersCharacterIDContractsReader struct {
|
||
formats strfmt.Registry
|
||
}
|
||
|
||
// ReadResponse reads a server response into the received o.
|
||
func (o *GetCharactersCharacterIDContractsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||
switch response.Code() {
|
||
|
||
case 200:
|
||
result := NewGetCharactersCharacterIDContractsOK()
|
||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
return nil, err
|
||
}
|
||
return result, nil
|
||
|
||
case 403:
|
||
result := NewGetCharactersCharacterIDContractsForbidden()
|
||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
return nil, err
|
||
}
|
||
return nil, result
|
||
|
||
case 500:
|
||
result := NewGetCharactersCharacterIDContractsInternalServerError()
|
||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
return nil, err
|
||
}
|
||
return nil, result
|
||
|
||
default:
|
||
return nil, runtime.NewAPIError("unknown error", response, response.Code())
|
||
}
|
||
}
|
||
|
||
// NewGetCharactersCharacterIDContractsOK creates a GetCharactersCharacterIDContractsOK with default headers values
|
||
func NewGetCharactersCharacterIDContractsOK() *GetCharactersCharacterIDContractsOK {
|
||
return &GetCharactersCharacterIDContractsOK{}
|
||
}
|
||
|
||
/*GetCharactersCharacterIDContractsOK handles this case with default header values.
|
||
|
||
A list of contracts
|
||
*/
|
||
type GetCharactersCharacterIDContractsOK struct {
|
||
/*The caching mechanism used
|
||
*/
|
||
CacheControl string
|
||
/*RFC7231 formatted datetime string
|
||
*/
|
||
Expires string
|
||
/*RFC7231 formatted datetime string
|
||
*/
|
||
LastModified string
|
||
|
||
Payload []*GetCharactersCharacterIDContractsOKBodyItems0
|
||
}
|
||
|
||
func (o *GetCharactersCharacterIDContractsOK) Error() string {
|
||
return fmt.Sprintf("[GET /characters/{character_id}/contracts/][%d] getCharactersCharacterIdContractsOK %+v", 200, o.Payload)
|
||
}
|
||
|
||
func (o *GetCharactersCharacterIDContractsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
||
// response header Cache-Control
|
||
o.CacheControl = response.GetHeader("Cache-Control")
|
||
|
||
// response header Expires
|
||
o.Expires = response.GetHeader("Expires")
|
||
|
||
// response header Last-Modified
|
||
o.LastModified = response.GetHeader("Last-Modified")
|
||
|
||
// response payload
|
||
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
||
return err
|
||
}
|
||
|
||
return nil
|
||
}
|
||
|
||
// NewGetCharactersCharacterIDContractsForbidden creates a GetCharactersCharacterIDContractsForbidden with default headers values
|
||
func NewGetCharactersCharacterIDContractsForbidden() *GetCharactersCharacterIDContractsForbidden {
|
||
return &GetCharactersCharacterIDContractsForbidden{}
|
||
}
|
||
|
||
/*GetCharactersCharacterIDContractsForbidden handles this case with default header values.
|
||
|
||
Forbidden
|
||
*/
|
||
type GetCharactersCharacterIDContractsForbidden struct {
|
||
Payload *models.Forbidden
|
||
}
|
||
|
||
func (o *GetCharactersCharacterIDContractsForbidden) Error() string {
|
||
return fmt.Sprintf("[GET /characters/{character_id}/contracts/][%d] getCharactersCharacterIdContractsForbidden %+v", 403, o.Payload)
|
||
}
|
||
|
||
func (o *GetCharactersCharacterIDContractsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
||
o.Payload = new(models.Forbidden)
|
||
|
||
// response payload
|
||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
return err
|
||
}
|
||
|
||
return nil
|
||
}
|
||
|
||
// NewGetCharactersCharacterIDContractsInternalServerError creates a GetCharactersCharacterIDContractsInternalServerError with default headers values
|
||
func NewGetCharactersCharacterIDContractsInternalServerError() *GetCharactersCharacterIDContractsInternalServerError {
|
||
return &GetCharactersCharacterIDContractsInternalServerError{}
|
||
}
|
||
|
||
/*GetCharactersCharacterIDContractsInternalServerError handles this case with default header values.
|
||
|
||
Internal server error
|
||
*/
|
||
type GetCharactersCharacterIDContractsInternalServerError struct {
|
||
Payload *models.InternalServerError
|
||
}
|
||
|
||
func (o *GetCharactersCharacterIDContractsInternalServerError) Error() string {
|
||
return fmt.Sprintf("[GET /characters/{character_id}/contracts/][%d] getCharactersCharacterIdContractsInternalServerError %+v", 500, o.Payload)
|
||
}
|
||
|
||
func (o *GetCharactersCharacterIDContractsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||
|
||
o.Payload = new(models.InternalServerError)
|
||
|
||
// response payload
|
||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
return err
|
||
}
|
||
|
||
return nil
|
||
}
|
||
|
||
/*GetCharactersCharacterIDContractsOKBodyItems0 get_characters_character_id_contracts_200_ok
|
||
//
|
||
// 200 ok object
|
||
swagger:model GetCharactersCharacterIDContractsOKBodyItems0
|
||
*/
|
||
type GetCharactersCharacterIDContractsOKBodyItems0 struct {
|
||
|
||
// get_characters_character_id_contracts_acceptor_id
|
||
//
|
||
// Who will accept the contract. If assignee_id is same as acceptorID then character ID else corporation ID (The contract accepted by the corporation)
|
||
// Required: true
|
||
AcceptorID *int32 `json:"acceptor_id"`
|
||
|
||
// get_characters_character_id_contracts_assignee_id
|
||
//
|
||
// ID to whom the contract is assigned, can be corporation or character ID
|
||
// Required: true
|
||
AssigneeID *int32 `json:"assignee_id"`
|
||
|
||
// get_characters_character_id_contracts_availability
|
||
//
|
||
// To whom the contract is available
|
||
// Required: true
|
||
Availability *string `json:"availability"`
|
||
|
||
// get_characters_character_id_contracts_buyout
|
||
//
|
||
// Buyout price (for Auctions only)
|
||
Buyout float32 `json:"buyout,omitempty"`
|
||
|
||
// get_characters_character_id_contracts_collateral
|
||
//
|
||
// Collateral price (for Couriers only)
|
||
Collateral float32 `json:"collateral,omitempty"`
|
||
|
||
// get_characters_character_id_contracts_contract_id
|
||
//
|
||
// contract_id integer
|
||
// Required: true
|
||
ContractID *int32 `json:"contract_id"`
|
||
|
||
// get_characters_character_id_contracts_date_accepted
|
||
//
|
||
// Date of confirmation of contract
|
||
DateAccepted strfmt.DateTime `json:"date_accepted,omitempty"`
|
||
|
||
// get_characters_character_id_contracts_date_completed
|
||
//
|
||
// Date of completed of contract
|
||
DateCompleted strfmt.DateTime `json:"date_completed,omitempty"`
|
||
|
||
// get_characters_character_id_contracts_date_expired
|
||
//
|
||
// Expiration date of the contract
|
||
// Required: true
|
||
DateExpired *strfmt.DateTime `json:"date_expired"`
|
||
|
||
// get_characters_character_id_contracts_date_issued
|
||
//
|
||
// Сreation date of the contract
|
||
// Required: true
|
||
DateIssued *strfmt.DateTime `json:"date_issued"`
|
||
|
||
// get_characters_character_id_contracts_days_to_complete
|
||
//
|
||
// Number of days to perform the contract
|
||
DaysToComplete int32 `json:"days_to_complete,omitempty"`
|
||
|
||
// get_characters_character_id_contracts_end_location_id
|
||
//
|
||
// End location ID (for Couriers contract)
|
||
EndLocationID int64 `json:"end_location_id,omitempty"`
|
||
|
||
// get_characters_character_id_contracts_for_corporation
|
||
//
|
||
// true if the contract was issued on behalf of the issuer's corporation
|
||
// Required: true
|
||
ForCorporation *bool `json:"for_corporation"`
|
||
|
||
// get_characters_character_id_contracts_issuer_corporation_id
|
||
//
|
||
// Character's corporation ID for the issuer
|
||
// Required: true
|
||
IssuerCorporationID *int32 `json:"issuer_corporation_id"`
|
||
|
||
// get_characters_character_id_contracts_issuer_id
|
||
//
|
||
// Character ID for the issuer
|
||
// Required: true
|
||
IssuerID *int32 `json:"issuer_id"`
|
||
|
||
// get_characters_character_id_contracts_price
|
||
//
|
||
// Price of contract (for ItemsExchange and Auctions)
|
||
Price float32 `json:"price,omitempty"`
|
||
|
||
// get_characters_character_id_contracts_reward
|
||
//
|
||
// Remuneration for contract (for Couriers only)
|
||
Reward float32 `json:"reward,omitempty"`
|
||
|
||
// get_characters_character_id_contracts_start_location_id
|
||
//
|
||
// Start location ID (for Couriers contract)
|
||
StartLocationID int64 `json:"start_location_id,omitempty"`
|
||
|
||
// get_characters_character_id_contracts_status
|
||
//
|
||
// Status of the the contract
|
||
// Required: true
|
||
Status *string `json:"status"`
|
||
|
||
// get_characters_character_id_contracts_title
|
||
//
|
||
// Title of the contract
|
||
Title string `json:"title,omitempty"`
|
||
|
||
// get_characters_character_id_contracts_type
|
||
//
|
||
// Type of the contract
|
||
// Required: true
|
||
Type *string `json:"type"`
|
||
|
||
// get_characters_character_id_contracts_volume
|
||
//
|
||
// Volume of items in the contract
|
||
Volume float32 `json:"volume,omitempty"`
|
||
}
|