func (m *ScriptEntity) UnmarshalBinary(b []byte) error {
	var res ScriptEntity
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}
UnmarshalBinary interface implementation
package models
import (
	strfmt "github.com/go-openapi/strfmt"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/swag"
)
type ScriptEntity struct {
	Entity
	ScriptCommon
}
func (m *ScriptEntity) UnmarshalJSON(raw []byte) error {
	var aO0 Entity
	if err := swag.ReadJSON(raw, &aO0); err != nil {
		return err
	}
	m.Entity = aO0
	var aO1 ScriptCommon
	if err := swag.ReadJSON(raw, &aO1); err != nil {
		return err
	}
	m.ScriptCommon = aO1
	return nil
}
func (m ScriptEntity) MarshalJSON() ([]byte, error) {
	_parts := make([][]byte, 0, 2)
	aO0, err := swag.WriteJSON(m.Entity)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, aO0)
	aO1, err := swag.WriteJSON(m.ScriptCommon)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, aO1)
	return swag.ConcatJSON(_parts...), nil
}
func (m *ScriptEntity) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.Entity.Validate(formats); err != nil {
		res = append(res, err)
	}
	if err := m.ScriptCommon.Validate(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
func (m *ScriptEntity) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}