// Code generated by go-swagger; DO NOT EDIT. package models // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/errors" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // GetCharactersCharacterIDClonesOKBody get_characters_character_id_clones_ok // // 200 ok object // swagger:model getCharactersCharacterIdClonesOKBody type GetCharactersCharacterIDClonesOKBody struct { // home location HomeLocation *GetCharactersCharacterIDClonesOKBodyHomeLocation `json:"home_location,omitempty"` // jump clones // Required: true JumpClones GetCharactersCharacterIDClonesOKBodyJumpClones `json:"jump_clones"` // get_characters_character_id_clones_last_jump_date // // last_jump_date string LastJumpDate strfmt.DateTime `json:"last_jump_date,omitempty"` } /* polymorph getCharactersCharacterIdClonesOKBody home_location false */ /* polymorph getCharactersCharacterIdClonesOKBody jump_clones false */ /* polymorph getCharactersCharacterIdClonesOKBody last_jump_date false */ // Validate validates this get characters character Id clones o k body func (m *GetCharactersCharacterIDClonesOKBody) Validate(formats strfmt.Registry) error { var res []error if err := m.validateHomeLocation(formats); err != nil { // prop res = append(res, err) } if err := m.validateJumpClones(formats); err != nil { // prop res = append(res, err) } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } func (m *GetCharactersCharacterIDClonesOKBody) validateHomeLocation(formats strfmt.Registry) error { if swag.IsZero(m.HomeLocation) { // not required return nil } if m.HomeLocation != nil { if err := m.HomeLocation.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("home_location") } return err } } return nil } func (m *GetCharactersCharacterIDClonesOKBody) validateJumpClones(formats strfmt.Registry) error { if err := validate.Required("jump_clones", "body", m.JumpClones); err != nil { return err } return nil } // MarshalBinary interface implementation func (m *GetCharactersCharacterIDClonesOKBody) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } return swag.WriteJSON(m) } // UnmarshalBinary interface implementation func (m *GetCharactersCharacterIDClonesOKBody) UnmarshalBinary(b []byte) error { var res GetCharactersCharacterIDClonesOKBody if err := swag.ReadJSON(b, &res); err != nil { return err } *m = res return nil }