func (o *Echo) GetModelMaterializeConfig() *datamodel.ModelMaterializeConfig {
	return nil
}
GetModelMaterializeConfig returns the materialization config if materialized or nil if not
package event
import (
	"context"
	"encoding/json"
	"fmt"
	"net/http"
	"net/http/httptest"
	"os"
	"sync"
	"testing"
	"time"
	"github.com/pinpt/go-common/v10/datamodel"
	"github.com/pinpt/go-common/v10/datetime"
	"github.com/pinpt/go-common/v10/hash"
	pjson "github.com/pinpt/go-common/v10/json"
	"github.com/pinpt/go-common/v10/number"
	pstrings "github.com/pinpt/go-common/v10/strings"
	"github.com/stretchr/testify/assert"
)
const (
	EchoTopic datamodel.TopicNameType = "test_Echo_topic"
	EchoTable datamodel.ModelNameType = "test_echo"
	EchoModelName datamodel.ModelNameType = "test.Echo"
)
const (
	EchoIDColumn = "ID"
	EchoMessageColumn = "Message"
	EchoUpdatedAtColumn = "UpdatedAt"
)
type Echo struct {
	ID string `json:"id" codec:"id" bson:"_id" yaml:"id" faker:"-"`
	Message *string `json:"message,omitempty" codec:"message,omitempty" bson:"message" yaml:"message,omitempty" faker:"-"`
	UpdatedAt int64 `json:"updated_ts" codec:"updated_ts" bson:"updated_ts" yaml:"updated_ts" faker:"-"`
	Hashcode string `json:"hashcode" codec:"hashcode" bson:"hashcode" yaml:"hashcode" faker:"-"`
}
var _ datamodel.Model = (*Echo)(nil)
var _ datamodel.StreamedModel = (*Echo)(nil)
func toEchoObject(o interface{}, isoptional bool) interface{} {
	switch v := o.(type) {
	case *Echo:
		return v.ToMap()
	default:
		return o
	}
}
func (o *Echo) String() string {
	return fmt.Sprintf("test.Echo<%s>", o.ID)
}
func (o *Echo) GetTopicName() datamodel.TopicNameType {
	return EchoTopic
}
func (o *Echo) GetStreamName() string {
	return ""
}
func (o *Echo) GetTableName() string {
	return EchoTable.String()
}
func (o *Echo) GetModelName() datamodel.ModelNameType {
	return EchoModelName
}
func NewEchoID(ID string) string {
	return hash.Values(ID, "name")
}
var emptyString string
func (o *Echo) setDefaults(frommap bool) {
	if o.Message == nil {
		o.Message = &emptyString
	}
	if o.ID == "" {
		o.ID = hash.Values(o.ID, "name")
	}
	if frommap {
		o.FromMap(map[string]interface{}{})
	}
}
func (o *Echo) GetID() string {
	return o.ID
}
func (o *Echo) GetTopicKey() string {
	var i interface{} = o.ID
	if s, ok := i.(string); ok {
		return s
	}
	return fmt.Sprintf("%v", i)
}
func (o *Echo) GetTimestamp() time.Time {
	var dt interface{} = o.UpdatedAt
	switch v := dt.(type) {
	case int64:
		return datetime.DateFromEpoch(v).UTC()
	case string:
		tv, err := datetime.ISODateToTime(v)
		if err != nil {
			panic(err)
		}
		return tv.UTC()
	case time.Time:
		return v.UTC()
	}
	panic("not sure how to handle the date time format for Echo")
}
func (o *Echo) IsMaterialized() bool {
	return false
}