func (m *OkResponse) UnmarshalBinary(b []byte) error {
	var res OkResponse
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}
UnmarshalBinary interface implementation
package models
import (
	"encoding/json"
	strfmt "github.com/go-openapi/strfmt"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)
type OkResponse struct {
	Result *string `json:"result"`
}
func (m *OkResponse) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.validateResult(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
var okResponseTypeResultPropEnum []interface{}
func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["ok"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		okResponseTypeResultPropEnum = append(okResponseTypeResultPropEnum, v)
	}
}
const (
	OkResponseResultOk string = "ok"
)
func (m *OkResponse) validateResultEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, okResponseTypeResultPropEnum); err != nil {
		return err
	}
	return nil
}
func (m *OkResponse) validateResult(formats strfmt.Registry) error {
	if err := validate.Required("result", "body", m.Result); err != nil {
		return err
	}
	if err := m.validateResultEnum("result", "body", *m.Result); err != nil {
		return err
	}
	return nil
}
func (m *OkResponse) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}