734 lines
19 KiB
Go
734 lines
19 KiB
Go
package bookmarks
|
|
|
|
// 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/errors"
|
|
"github.com/go-openapi/runtime"
|
|
"github.com/go-openapi/swag"
|
|
"github.com/go-openapi/validate"
|
|
|
|
strfmt "github.com/go-openapi/strfmt"
|
|
)
|
|
|
|
// GetCharactersCharacterIDBookmarksReader is a Reader for the GetCharactersCharacterIDBookmarks structure.
|
|
type GetCharactersCharacterIDBookmarksReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetCharactersCharacterIDBookmarksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
|
|
case 200:
|
|
result := NewGetCharactersCharacterIDBookmarksOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
|
|
case 403:
|
|
result := NewGetCharactersCharacterIDBookmarksForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
|
|
case 500:
|
|
result := NewGetCharactersCharacterIDBookmarksInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewGetCharactersCharacterIDBookmarksOK creates a GetCharactersCharacterIDBookmarksOK with default headers values
|
|
func NewGetCharactersCharacterIDBookmarksOK() *GetCharactersCharacterIDBookmarksOK {
|
|
return &GetCharactersCharacterIDBookmarksOK{}
|
|
}
|
|
|
|
/*GetCharactersCharacterIDBookmarksOK handles this case with default header values.
|
|
|
|
A list of bookmarks
|
|
*/
|
|
type GetCharactersCharacterIDBookmarksOK struct {
|
|
/*The caching mechanism used
|
|
*/
|
|
CacheControl string
|
|
/*RFC7231 formatted datetime string
|
|
*/
|
|
Expires string
|
|
/*RFC7231 formatted datetime string
|
|
*/
|
|
LastModified string
|
|
|
|
Payload []*GetCharactersCharacterIDBookmarksOKBodyItems0
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksOK) Error() string {
|
|
return fmt.Sprintf("[GET /characters/{character_id}/bookmarks/][%d] getCharactersCharacterIdBookmarksOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksOK) 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
|
|
}
|
|
|
|
// NewGetCharactersCharacterIDBookmarksForbidden creates a GetCharactersCharacterIDBookmarksForbidden with default headers values
|
|
func NewGetCharactersCharacterIDBookmarksForbidden() *GetCharactersCharacterIDBookmarksForbidden {
|
|
return &GetCharactersCharacterIDBookmarksForbidden{}
|
|
}
|
|
|
|
/*GetCharactersCharacterIDBookmarksForbidden handles this case with default header values.
|
|
|
|
Forbidden
|
|
*/
|
|
type GetCharactersCharacterIDBookmarksForbidden struct {
|
|
Payload GetCharactersCharacterIDBookmarksForbiddenBody
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksForbidden) Error() string {
|
|
return fmt.Sprintf("[GET /characters/{character_id}/bookmarks/][%d] getCharactersCharacterIdBookmarksForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetCharactersCharacterIDBookmarksInternalServerError creates a GetCharactersCharacterIDBookmarksInternalServerError with default headers values
|
|
func NewGetCharactersCharacterIDBookmarksInternalServerError() *GetCharactersCharacterIDBookmarksInternalServerError {
|
|
return &GetCharactersCharacterIDBookmarksInternalServerError{}
|
|
}
|
|
|
|
/*GetCharactersCharacterIDBookmarksInternalServerError handles this case with default header values.
|
|
|
|
Internal server error
|
|
*/
|
|
type GetCharactersCharacterIDBookmarksInternalServerError struct {
|
|
Payload GetCharactersCharacterIDBookmarksInternalServerErrorBody
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /characters/{character_id}/bookmarks/][%d] getCharactersCharacterIdBookmarksInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
/*GetCharactersCharacterIDBookmarksForbiddenBody get_characters_character_id_bookmarks_forbidden
|
|
//
|
|
// Forbidden
|
|
swagger:model GetCharactersCharacterIDBookmarksForbiddenBody
|
|
*/
|
|
type GetCharactersCharacterIDBookmarksForbiddenBody struct {
|
|
|
|
// get_characters_character_id_bookmarks_403_forbidden
|
|
//
|
|
// Forbidden message
|
|
// Required: true
|
|
Error *string `json:"error"`
|
|
}
|
|
|
|
// Validate validates this get characters character ID bookmarks forbidden body
|
|
func (o *GetCharactersCharacterIDBookmarksForbiddenBody) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := o.validateError(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksForbiddenBody) validateError(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getCharactersCharacterIdBookmarksForbidden"+"."+"error", "body", o.Error); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (o *GetCharactersCharacterIDBookmarksForbiddenBody) MarshalBinary() ([]byte, error) {
|
|
if o == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(o)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (o *GetCharactersCharacterIDBookmarksForbiddenBody) UnmarshalBinary(b []byte) error {
|
|
var res GetCharactersCharacterIDBookmarksForbiddenBody
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*o = res
|
|
return nil
|
|
}
|
|
|
|
/*GetCharactersCharacterIDBookmarksInternalServerErrorBody get_characters_character_id_bookmarks_internal_server_error
|
|
//
|
|
// Internal server error
|
|
swagger:model GetCharactersCharacterIDBookmarksInternalServerErrorBody
|
|
*/
|
|
type GetCharactersCharacterIDBookmarksInternalServerErrorBody struct {
|
|
|
|
// get_characters_character_id_bookmarks_500_internal_server_error
|
|
//
|
|
// Internal server error message
|
|
// Required: true
|
|
Error *string `json:"error"`
|
|
}
|
|
|
|
// Validate validates this get characters character ID bookmarks internal server error body
|
|
func (o *GetCharactersCharacterIDBookmarksInternalServerErrorBody) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := o.validateError(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksInternalServerErrorBody) validateError(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getCharactersCharacterIdBookmarksInternalServerError"+"."+"error", "body", o.Error); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (o *GetCharactersCharacterIDBookmarksInternalServerErrorBody) MarshalBinary() ([]byte, error) {
|
|
if o == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(o)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (o *GetCharactersCharacterIDBookmarksInternalServerErrorBody) UnmarshalBinary(b []byte) error {
|
|
var res GetCharactersCharacterIDBookmarksInternalServerErrorBody
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*o = res
|
|
return nil
|
|
}
|
|
|
|
/*GetCharactersCharacterIDBookmarksOKBodyItems0 get_characters_character_id_bookmarks_200_ok
|
|
//
|
|
// 200 ok object
|
|
swagger:model GetCharactersCharacterIDBookmarksOKBodyItems0
|
|
*/
|
|
type GetCharactersCharacterIDBookmarksOKBodyItems0 struct {
|
|
|
|
// get_characters_character_id_bookmarks_bookmark_id
|
|
//
|
|
// bookmark_id integer
|
|
// Required: true
|
|
BookmarkID *int64 `json:"bookmark_id"`
|
|
|
|
// get_characters_character_id_bookmarks_create_date
|
|
//
|
|
// create_date string
|
|
// Required: true
|
|
CreateDate *strfmt.DateTime `json:"create_date"`
|
|
|
|
// get_characters_character_id_bookmarks_creator_id
|
|
//
|
|
// creator_id integer
|
|
// Required: true
|
|
CreatorID *int32 `json:"creator_id"`
|
|
|
|
// get_characters_character_id_bookmarks_folder_id
|
|
//
|
|
// folder_id integer
|
|
FolderID int32 `json:"folder_id,omitempty"`
|
|
|
|
// get_characters_character_id_bookmarks_memo
|
|
//
|
|
// memo string
|
|
// Required: true
|
|
Memo *string `json:"memo"`
|
|
|
|
// get_characters_character_id_bookmarks_note
|
|
//
|
|
// note string
|
|
// Required: true
|
|
Note *string `json:"note"`
|
|
|
|
// get_characters_character_id_bookmarks_owner_id
|
|
//
|
|
// owner_id integer
|
|
// Required: true
|
|
OwnerID *int32 `json:"owner_id"`
|
|
|
|
// target
|
|
// Required: true
|
|
Target *GetCharactersCharacterIDBookmarksOKBodyItems0Target `json:"target"`
|
|
}
|
|
|
|
// Validate validates this get characters character ID bookmarks o k body items0
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := o.validateBookmarkID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateCreateDate(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateCreatorID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateMemo(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateNote(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateOwnerID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateTarget(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0) validateBookmarkID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("bookmark_id", "body", o.BookmarkID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0) validateCreateDate(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("create_date", "body", o.CreateDate); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0) validateCreatorID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("creator_id", "body", o.CreatorID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0) validateMemo(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("memo", "body", o.Memo); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0) validateNote(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("note", "body", o.Note); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0) validateOwnerID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("owner_id", "body", o.OwnerID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0) validateTarget(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("target", "body", o.Target); err != nil {
|
|
return err
|
|
}
|
|
|
|
if o.Target != nil {
|
|
|
|
if err := o.Target.Validate(formats); err != nil {
|
|
if ve, ok := err.(*errors.Validation); ok {
|
|
return ve.ValidateName("target")
|
|
}
|
|
return err
|
|
}
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0) MarshalBinary() ([]byte, error) {
|
|
if o == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(o)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0) UnmarshalBinary(b []byte) error {
|
|
var res GetCharactersCharacterIDBookmarksOKBodyItems0
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*o = res
|
|
return nil
|
|
}
|
|
|
|
/*GetCharactersCharacterIDBookmarksOKBodyItems0Target get_characters_character_id_bookmarks_target
|
|
//
|
|
// target object
|
|
swagger:model GetCharactersCharacterIDBookmarksOKBodyItems0Target
|
|
*/
|
|
type GetCharactersCharacterIDBookmarksOKBodyItems0Target struct {
|
|
|
|
// coordinates
|
|
Coordinates *GetCharactersCharacterIDBookmarksOKBodyItems0TargetCoordinates `json:"coordinates,omitempty"`
|
|
|
|
// item
|
|
Item *GetCharactersCharacterIDBookmarksOKBodyItems0TargetItem `json:"item,omitempty"`
|
|
|
|
// get_characters_character_id_bookmarks_location_id
|
|
//
|
|
// location_id integer
|
|
// Required: true
|
|
LocationID *int64 `json:"location_id"`
|
|
}
|
|
|
|
// Validate validates this get characters character ID bookmarks o k body items0 target
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0Target) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := o.validateCoordinates(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateItem(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateLocationID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0Target) validateCoordinates(formats strfmt.Registry) error {
|
|
|
|
if swag.IsZero(o.Coordinates) { // not required
|
|
return nil
|
|
}
|
|
|
|
if o.Coordinates != nil {
|
|
|
|
if err := o.Coordinates.Validate(formats); err != nil {
|
|
if ve, ok := err.(*errors.Validation); ok {
|
|
return ve.ValidateName("target" + "." + "coordinates")
|
|
}
|
|
return err
|
|
}
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0Target) validateItem(formats strfmt.Registry) error {
|
|
|
|
if swag.IsZero(o.Item) { // not required
|
|
return nil
|
|
}
|
|
|
|
if o.Item != nil {
|
|
|
|
if err := o.Item.Validate(formats); err != nil {
|
|
if ve, ok := err.(*errors.Validation); ok {
|
|
return ve.ValidateName("target" + "." + "item")
|
|
}
|
|
return err
|
|
}
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0Target) validateLocationID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("target"+"."+"location_id", "body", o.LocationID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0Target) MarshalBinary() ([]byte, error) {
|
|
if o == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(o)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0Target) UnmarshalBinary(b []byte) error {
|
|
var res GetCharactersCharacterIDBookmarksOKBodyItems0Target
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*o = res
|
|
return nil
|
|
}
|
|
|
|
/*GetCharactersCharacterIDBookmarksOKBodyItems0TargetCoordinates get_characters_character_id_bookmarks_coordinates
|
|
//
|
|
// coordinates object
|
|
swagger:model GetCharactersCharacterIDBookmarksOKBodyItems0TargetCoordinates
|
|
*/
|
|
type GetCharactersCharacterIDBookmarksOKBodyItems0TargetCoordinates struct {
|
|
|
|
// get_characters_character_id_bookmarks_x
|
|
//
|
|
// x number
|
|
// Required: true
|
|
X *float64 `json:"x"`
|
|
|
|
// get_characters_character_id_bookmarks_y
|
|
//
|
|
// y number
|
|
// Required: true
|
|
Y *float64 `json:"y"`
|
|
|
|
// get_characters_character_id_bookmarks_z
|
|
//
|
|
// z number
|
|
// Required: true
|
|
Z *float64 `json:"z"`
|
|
}
|
|
|
|
// Validate validates this get characters character ID bookmarks o k body items0 target coordinates
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0TargetCoordinates) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := o.validateX(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateY(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateZ(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0TargetCoordinates) validateX(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("target"+"."+"coordinates"+"."+"x", "body", o.X); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0TargetCoordinates) validateY(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("target"+"."+"coordinates"+"."+"y", "body", o.Y); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0TargetCoordinates) validateZ(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("target"+"."+"coordinates"+"."+"z", "body", o.Z); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0TargetCoordinates) MarshalBinary() ([]byte, error) {
|
|
if o == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(o)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0TargetCoordinates) UnmarshalBinary(b []byte) error {
|
|
var res GetCharactersCharacterIDBookmarksOKBodyItems0TargetCoordinates
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*o = res
|
|
return nil
|
|
}
|
|
|
|
/*GetCharactersCharacterIDBookmarksOKBodyItems0TargetItem get_characters_character_id_bookmarks_item
|
|
//
|
|
// item object
|
|
swagger:model GetCharactersCharacterIDBookmarksOKBodyItems0TargetItem
|
|
*/
|
|
type GetCharactersCharacterIDBookmarksOKBodyItems0TargetItem struct {
|
|
|
|
// get_characters_character_id_bookmarks_item_id
|
|
//
|
|
// item_id integer
|
|
// Required: true
|
|
ItemID *int64 `json:"item_id"`
|
|
|
|
// get_characters_character_id_bookmarks_type_id
|
|
//
|
|
// type_id integer
|
|
// Required: true
|
|
TypeID *int32 `json:"type_id"`
|
|
}
|
|
|
|
// Validate validates this get characters character ID bookmarks o k body items0 target item
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0TargetItem) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := o.validateItemID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateTypeID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0TargetItem) validateItemID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("target"+"."+"item"+"."+"item_id", "body", o.ItemID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0TargetItem) validateTypeID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("target"+"."+"item"+"."+"type_id", "body", o.TypeID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0TargetItem) MarshalBinary() ([]byte, error) {
|
|
if o == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(o)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (o *GetCharactersCharacterIDBookmarksOKBodyItems0TargetItem) UnmarshalBinary(b []byte) error {
|
|
var res GetCharactersCharacterIDBookmarksOKBodyItems0TargetItem
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*o = res
|
|
return nil
|
|
}
|