// Code generated by go-swagger; DO NOT EDIT. package wallet // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "encoding/json" "fmt" "io" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" "github.com/go-openapi/swag" "github.com/go-openapi/validate" strfmt "github.com/go-openapi/strfmt" "../../models" ) // GetCharactersCharacterIDWalletJournalReader is a Reader for the GetCharactersCharacterIDWalletJournal structure. type GetCharactersCharacterIDWalletJournalReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *GetCharactersCharacterIDWalletJournalReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewGetCharactersCharacterIDWalletJournalOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 403: result := NewGetCharactersCharacterIDWalletJournalForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewGetCharactersCharacterIDWalletJournalInternalServerError() 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()) } } // NewGetCharactersCharacterIDWalletJournalOK creates a GetCharactersCharacterIDWalletJournalOK with default headers values func NewGetCharactersCharacterIDWalletJournalOK() *GetCharactersCharacterIDWalletJournalOK { return &GetCharactersCharacterIDWalletJournalOK{} } /*GetCharactersCharacterIDWalletJournalOK handles this case with default header values. Journal entries */ type GetCharactersCharacterIDWalletJournalOK struct { /*The caching mechanism used */ CacheControl string /*RFC7231 formatted datetime string */ Expires string /*RFC7231 formatted datetime string */ LastModified string Payload []*GetCharactersCharacterIDWalletJournalOKBodyItems0 } func (o *GetCharactersCharacterIDWalletJournalOK) Error() string { return fmt.Sprintf("[GET /characters/{character_id}/wallet/journal/][%d] getCharactersCharacterIdWalletJournalOK %+v", 200, o.Payload) } func (o *GetCharactersCharacterIDWalletJournalOK) 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 } // NewGetCharactersCharacterIDWalletJournalForbidden creates a GetCharactersCharacterIDWalletJournalForbidden with default headers values func NewGetCharactersCharacterIDWalletJournalForbidden() *GetCharactersCharacterIDWalletJournalForbidden { return &GetCharactersCharacterIDWalletJournalForbidden{} } /*GetCharactersCharacterIDWalletJournalForbidden handles this case with default header values. Forbidden */ type GetCharactersCharacterIDWalletJournalForbidden struct { Payload *models.Forbidden } func (o *GetCharactersCharacterIDWalletJournalForbidden) Error() string { return fmt.Sprintf("[GET /characters/{character_id}/wallet/journal/][%d] getCharactersCharacterIdWalletJournalForbidden %+v", 403, o.Payload) } func (o *GetCharactersCharacterIDWalletJournalForbidden) 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 } // NewGetCharactersCharacterIDWalletJournalInternalServerError creates a GetCharactersCharacterIDWalletJournalInternalServerError with default headers values func NewGetCharactersCharacterIDWalletJournalInternalServerError() *GetCharactersCharacterIDWalletJournalInternalServerError { return &GetCharactersCharacterIDWalletJournalInternalServerError{} } /*GetCharactersCharacterIDWalletJournalInternalServerError handles this case with default header values. Internal server error */ type GetCharactersCharacterIDWalletJournalInternalServerError struct { Payload *models.InternalServerError } func (o *GetCharactersCharacterIDWalletJournalInternalServerError) Error() string { return fmt.Sprintf("[GET /characters/{character_id}/wallet/journal/][%d] getCharactersCharacterIdWalletJournalInternalServerError %+v", 500, o.Payload) } func (o *GetCharactersCharacterIDWalletJournalInternalServerError) 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 } /*GetCharactersCharacterIDWalletJournalOKBodyItems0 get_characters_character_id_wallet_journal_200_ok // // 200 ok object swagger:model GetCharactersCharacterIDWalletJournalOKBodyItems0 */ type GetCharactersCharacterIDWalletJournalOKBodyItems0 struct { // get_characters_character_id_wallet_journal_amount // // Transaction amount. Positive when value transferred to the first party. Negative otherwise Amount float32 `json:"amount,omitempty"` // get_characters_character_id_wallet_journal_balance // // Wallet balance after transaction occurred Balance float32 `json:"balance,omitempty"` // get_characters_character_id_wallet_journal_date // // Date and time of transaction // Required: true Date *strfmt.DateTime `json:"date"` // extra info ExtraInfo *GetCharactersCharacterIDWalletJournalOKBodyItems0ExtraInfo `json:"extra_info,omitempty"` // get_characters_character_id_wallet_journal_first_party_id // // first_party_id integer FirstPartyID int32 `json:"first_party_id,omitempty"` // get_characters_character_id_wallet_journal_first_party_type // // first_party_type string FirstPartyType string `json:"first_party_type,omitempty"` // get_characters_character_id_wallet_journal_reason // // reason string Reason string `json:"reason,omitempty"` // get_characters_character_id_wallet_journal_ref_id // // Unique journal reference ID // Required: true RefID *int64 `json:"ref_id"` // get_characters_character_id_wallet_journal_ref_type // // Transaction type, different type of transaction will populate different fields in `extra_info` // Required: true RefType *string `json:"ref_type"` // get_characters_character_id_wallet_journal_second_party_id // // second_party_id integer SecondPartyID int32 `json:"second_party_id,omitempty"` // get_characters_character_id_wallet_journal_second_party_type // // second_party_type string SecondPartyType string `json:"second_party_type,omitempty"` // get_characters_character_id_wallet_journal_tax // // Tax amount received for tax related transactions Tax float32 `json:"tax,omitempty"` // get_characters_character_id_wallet_journal_tax_reciever_id // // the corporation ID receiving any tax paid TaxRecieverID int32 `json:"tax_reciever_id,omitempty"` } // Validate validates this get characters character ID wallet journal o k body items0 func (o *GetCharactersCharacterIDWalletJournalOKBodyItems0) Validate(formats strfmt.Registry) error { var res []error if err := o.validateDate(formats); err != nil { // prop res = append(res, err) } if err := o.validateExtraInfo(formats); err != nil { // prop res = append(res, err) } if err := o.validateFirstPartyType(formats); err != nil { // prop res = append(res, err) } if err := o.validateRefID(formats); err != nil { // prop res = append(res, err) } if err := o.validateRefType(formats); err != nil { // prop res = append(res, err) } if err := o.validateSecondPartyType(formats); err != nil { // prop res = append(res, err) } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } func (o *GetCharactersCharacterIDWalletJournalOKBodyItems0) validateDate(formats strfmt.Registry) error { if err := validate.Required("date", "body", o.Date); err != nil { return err } return nil } func (o *GetCharactersCharacterIDWalletJournalOKBodyItems0) validateExtraInfo(formats strfmt.Registry) error { if swag.IsZero(o.ExtraInfo) { // not required return nil } if o.ExtraInfo != nil { if err := o.ExtraInfo.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("extra_info") } return err } } return nil } var getCharactersCharacterIdWalletJournalOKBodyItems0TypeFirstPartyTypePropEnum []interface{} func init() { var res []string if err := json.Unmarshal([]byte(`["character","corporation","alliance","faction"]`), &res); err != nil { panic(err) } for _, v := range res { getCharactersCharacterIdWalletJournalOKBodyItems0TypeFirstPartyTypePropEnum = append(getCharactersCharacterIdWalletJournalOKBodyItems0TypeFirstPartyTypePropEnum, v) } } const ( // GetCharactersCharacterIDWalletJournalOKBodyItems0FirstPartyTypeCharacter captures enum value "character" GetCharactersCharacterIDWalletJournalOKBodyItems0FirstPartyTypeCharacter string = "character" // GetCharactersCharacterIDWalletJournalOKBodyItems0FirstPartyTypeCorporation captures enum value "corporation" GetCharactersCharacterIDWalletJournalOKBodyItems0FirstPartyTypeCorporation string = "corporation" // GetCharactersCharacterIDWalletJournalOKBodyItems0FirstPartyTypeAlliance captures enum value "alliance" GetCharactersCharacterIDWalletJournalOKBodyItems0FirstPartyTypeAlliance string = "alliance" // GetCharactersCharacterIDWalletJournalOKBodyItems0FirstPartyTypeFaction captures enum value "faction" GetCharactersCharacterIDWalletJournalOKBodyItems0FirstPartyTypeFaction string = "faction" ) // prop value enum func (o *GetCharactersCharacterIDWalletJournalOKBodyItems0) validateFirstPartyTypeEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, getCharactersCharacterIdWalletJournalOKBodyItems0TypeFirstPartyTypePropEnum); err != nil { return err } return nil } func (o *GetCharactersCharacterIDWalletJournalOKBodyItems0) validateFirstPartyType(formats strfmt.Registry) error { if swag.IsZero(o.FirstPartyType) { // not required return nil } // value enum if err := o.validateFirstPartyTypeEnum("first_party_type", "body", o.FirstPartyType); err != nil { return err } return nil } func (o *GetCharactersCharacterIDWalletJournalOKBodyItems0) validateRefID(formats strfmt.Registry) error { if err := validate.Required("ref_id", "body", o.RefID); err != nil { return err } return nil } var getCharactersCharacterIdWalletJournalOKBodyItems0TypeRefTypePropEnum []interface{} func init() { var res []string if err := json.Unmarshal([]byte(`["player_trading","market_transaction","player_donation","office_rental_fee","bounty_prize_historical","insurance","mission_reward","mission_reward_bonus","cspa","corp_account_withdrawal","logo_change_fee","market_escrow","broker_fee","alliance_maintenance_fee","sales_tax","jump_clone_installation_fee","manufacturing","contract","bounty_prizes","medal_creation_fee","medal_issuing_fee","customs_office_import_duty","customs_office_export_duty","corporate_reward_payout","industry_facility_tax","project_discovery_reward","reprocessing_fee","jump_clone_activation_fee","unknown"]`), &res); err != nil { panic(err) } for _, v := range res { getCharactersCharacterIdWalletJournalOKBodyItems0TypeRefTypePropEnum = append(getCharactersCharacterIdWalletJournalOKBodyItems0TypeRefTypePropEnum, v) } } const ( // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypePlayerTrading captures enum value "player_trading" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypePlayerTrading string = "player_trading" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeMarketTransaction captures enum value "market_transaction" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeMarketTransaction string = "market_transaction" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypePlayerDonation captures enum value "player_donation" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypePlayerDonation string = "player_donation" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeOfficeRentalFee captures enum value "office_rental_fee" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeOfficeRentalFee string = "office_rental_fee" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeBountyPrizeHistorical captures enum value "bounty_prize_historical" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeBountyPrizeHistorical string = "bounty_prize_historical" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeInsurance captures enum value "insurance" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeInsurance string = "insurance" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeMissionReward captures enum value "mission_reward" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeMissionReward string = "mission_reward" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeMissionRewardBonus captures enum value "mission_reward_bonus" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeMissionRewardBonus string = "mission_reward_bonus" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeCspa captures enum value "cspa" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeCspa string = "cspa" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeCorpAccountWithdrawal captures enum value "corp_account_withdrawal" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeCorpAccountWithdrawal string = "corp_account_withdrawal" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeLogoChangeFee captures enum value "logo_change_fee" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeLogoChangeFee string = "logo_change_fee" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeMarketEscrow captures enum value "market_escrow" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeMarketEscrow string = "market_escrow" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeBrokerFee captures enum value "broker_fee" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeBrokerFee string = "broker_fee" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeAllianceMaintenanceFee captures enum value "alliance_maintenance_fee" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeAllianceMaintenanceFee string = "alliance_maintenance_fee" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeSalesTax captures enum value "sales_tax" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeSalesTax string = "sales_tax" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeJumpCloneInstallationFee captures enum value "jump_clone_installation_fee" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeJumpCloneInstallationFee string = "jump_clone_installation_fee" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeManufacturing captures enum value "manufacturing" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeManufacturing string = "manufacturing" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeContract captures enum value "contract" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeContract string = "contract" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeBountyPrizes captures enum value "bounty_prizes" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeBountyPrizes string = "bounty_prizes" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeMedalCreationFee captures enum value "medal_creation_fee" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeMedalCreationFee string = "medal_creation_fee" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeMedalIssuingFee captures enum value "medal_issuing_fee" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeMedalIssuingFee string = "medal_issuing_fee" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeCustomsOfficeImportDuty captures enum value "customs_office_import_duty" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeCustomsOfficeImportDuty string = "customs_office_import_duty" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeCustomsOfficeExportDuty captures enum value "customs_office_export_duty" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeCustomsOfficeExportDuty string = "customs_office_export_duty" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeCorporateRewardPayout captures enum value "corporate_reward_payout" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeCorporateRewardPayout string = "corporate_reward_payout" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeIndustryFacilityTax captures enum value "industry_facility_tax" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeIndustryFacilityTax string = "industry_facility_tax" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeProjectDiscoveryReward captures enum value "project_discovery_reward" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeProjectDiscoveryReward string = "project_discovery_reward" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeReprocessingFee captures enum value "reprocessing_fee" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeReprocessingFee string = "reprocessing_fee" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeJumpCloneActivationFee captures enum value "jump_clone_activation_fee" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeJumpCloneActivationFee string = "jump_clone_activation_fee" // GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeUnknown captures enum value "unknown" GetCharactersCharacterIDWalletJournalOKBodyItems0RefTypeUnknown string = "unknown" ) // prop value enum func (o *GetCharactersCharacterIDWalletJournalOKBodyItems0) validateRefTypeEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, getCharactersCharacterIdWalletJournalOKBodyItems0TypeRefTypePropEnum); err != nil { return err } return nil } func (o *GetCharactersCharacterIDWalletJournalOKBodyItems0) validateRefType(formats strfmt.Registry) error { if err := validate.Required("ref_type", "body", o.RefType); err != nil { return err } // value enum if err := o.validateRefTypeEnum("ref_type", "body", *o.RefType); err != nil { return err } return nil } var getCharactersCharacterIdWalletJournalOKBodyItems0TypeSecondPartyTypePropEnum []interface{} func init() { var res []string if err := json.Unmarshal([]byte(`["character","corporation","alliance","faction"]`), &res); err != nil { panic(err) } for _, v := range res { getCharactersCharacterIdWalletJournalOKBodyItems0TypeSecondPartyTypePropEnum = append(getCharactersCharacterIdWalletJournalOKBodyItems0TypeSecondPartyTypePropEnum, v) } } const ( // GetCharactersCharacterIDWalletJournalOKBodyItems0SecondPartyTypeCharacter captures enum value "character" GetCharactersCharacterIDWalletJournalOKBodyItems0SecondPartyTypeCharacter string = "character" // GetCharactersCharacterIDWalletJournalOKBodyItems0SecondPartyTypeCorporation captures enum value "corporation" GetCharactersCharacterIDWalletJournalOKBodyItems0SecondPartyTypeCorporation string = "corporation" // GetCharactersCharacterIDWalletJournalOKBodyItems0SecondPartyTypeAlliance captures enum value "alliance" GetCharactersCharacterIDWalletJournalOKBodyItems0SecondPartyTypeAlliance string = "alliance" // GetCharactersCharacterIDWalletJournalOKBodyItems0SecondPartyTypeFaction captures enum value "faction" GetCharactersCharacterIDWalletJournalOKBodyItems0SecondPartyTypeFaction string = "faction" ) // prop value enum func (o *GetCharactersCharacterIDWalletJournalOKBodyItems0) validateSecondPartyTypeEnum(path, location string, value string) error { if err := validate.Enum(path, location, value, getCharactersCharacterIdWalletJournalOKBodyItems0TypeSecondPartyTypePropEnum); err != nil { return err } return nil } func (o *GetCharactersCharacterIDWalletJournalOKBodyItems0) validateSecondPartyType(formats strfmt.Registry) error { if swag.IsZero(o.SecondPartyType) { // not required return nil } // value enum if err := o.validateSecondPartyTypeEnum("second_party_type", "body", o.SecondPartyType); err != nil { return err } return nil } // MarshalBinary interface implementation func (o *GetCharactersCharacterIDWalletJournalOKBodyItems0) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } return swag.WriteJSON(o) } // UnmarshalBinary interface implementation func (o *GetCharactersCharacterIDWalletJournalOKBodyItems0) UnmarshalBinary(b []byte) error { var res GetCharactersCharacterIDWalletJournalOKBodyItems0 if err := swag.ReadJSON(b, &res); err != nil { return err } *o = res return nil } /*GetCharactersCharacterIDWalletJournalOKBodyItems0ExtraInfo get_characters_character_id_wallet_journal_extra_info // // Extra information for different type of transaction swagger:model GetCharactersCharacterIDWalletJournalOKBodyItems0ExtraInfo */ type GetCharactersCharacterIDWalletJournalOKBodyItems0ExtraInfo struct { // get_characters_character_id_wallet_journal_alliance_id // // alliance_id integer AllianceID int32 `json:"alliance_id,omitempty"` // get_characters_character_id_wallet_journal_character_id // // character_id integer CharacterID int32 `json:"character_id,omitempty"` // get_characters_character_id_wallet_journal_contract_id // // contract_id integer ContractID int32 `json:"contract_id,omitempty"` // get_characters_character_id_wallet_journal_corporation_id // // corporation_id integer CorporationID int32 `json:"corporation_id,omitempty"` // get_characters_character_id_wallet_journal_destroyed_ship_type_id // // destroyed_ship_type_id integer DestroyedShipTypeID int32 `json:"destroyed_ship_type_id,omitempty"` // get_characters_character_id_wallet_journal_job_id // // job_id integer JobID int32 `json:"job_id,omitempty"` // get_characters_character_id_wallet_journal_location_id // // location_id integer LocationID int64 `json:"location_id,omitempty"` // get_characters_character_id_wallet_journal_npc_id // // npc_id integer NpcID int32 `json:"npc_id,omitempty"` // get_characters_character_id_wallet_journal_npc_name // // npc_name string NpcName string `json:"npc_name,omitempty"` // get_characters_character_id_wallet_journal_planet_id // // planet_id integer PlanetID int32 `json:"planet_id,omitempty"` // get_characters_character_id_wallet_journal_system_id // // system_id integer SystemID int32 `json:"system_id,omitempty"` // get_characters_character_id_wallet_journal_transaction_id // // transaction_id integer TransactionID int64 `json:"transaction_id,omitempty"` } // Validate validates this get characters character ID wallet journal o k body items0 extra info func (o *GetCharactersCharacterIDWalletJournalOKBodyItems0ExtraInfo) Validate(formats strfmt.Registry) error { var res []error if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } // MarshalBinary interface implementation func (o *GetCharactersCharacterIDWalletJournalOKBodyItems0ExtraInfo) MarshalBinary() ([]byte, error) { if o == nil { return nil, nil } return swag.WriteJSON(o) } // UnmarshalBinary interface implementation func (o *GetCharactersCharacterIDWalletJournalOKBodyItems0ExtraInfo) UnmarshalBinary(b []byte) error { var res GetCharactersCharacterIDWalletJournalOKBodyItems0ExtraInfo if err := swag.ReadJSON(b, &res); err != nil { return err } *o = res return nil }