func (builder *CardBuilder) AddNoteBlock(elements []protocol.BaseElement) *CardBuilder {
	note := &protocol.NoteBlockForm{}
	note.Tag = protocol.NOTE_BLOCK
	note.Elements = elements
	if builder.currentLocale != "" {
		builder.i18nBlocks[builder.currentLocale] = append(builder.i18nBlocks[builder.currentLocale], note)
	} else {
		builder.blocks = append(builder.blocks, note)
	}
	return builder
}
add note block
package message
import (
	"encoding/json"
	"github.com/google/uuid"
	"github.com/larksuite/botframework-go/SDK/protocol"
)
type CardBuilder struct {
	blocks        []interface{}  
	i18nBlocks    map[string][]interface{}
	currentLocale string
	Header        *protocol.CardHeaderForm
	Conf          *protocol.ConfigForm
	OpenIDs       []string
	Session       *string
}
func (builder *CardBuilder) SwitchLocale(locale protocol.Language) *CardBuilder {
	if builder.i18nBlocks == nil {
		builder.i18nBlocks = make(map[string][]interface{}, 0)
	}
	builder.currentLocale = locale.String()
	return builder
}
func (builder *CardBuilder) SetConfig(config protocol.ConfigForm) *CardBuilder {
	builder.Conf = &config
	return builder
}
func (builder *CardBuilder) SetUpdatingUserGroup(users []string) *CardBuilder {
	builder.OpenIDs = users
	return builder
}
func (builder *CardBuilder) AddHeader(title protocol.TextForm, template string) *CardBuilder {
	header := &protocol.CardHeaderForm{}
	header.Title = title
	header.Template = template
	builder.Header = header
	return builder
}
func (builder *CardBuilder) AddDIVBlock(text *protocol.TextForm, field []protocol.FieldForm, extra interface{}) *CardBuilder {
	if builder.Session == nil {
		sid := uuid.New().String()
		builder.Session = &sid
	}
	div := &protocol.DIVBlockForm{}
	div.Tag = protocol.DIV_BLOCK
	div.Text = text
	div.Field = field
	if act, ok := extra.(protocol.ActionElement); ok {
		div.Extra = act
		act.SetSession(*builder.Session)
	} else if base, ok := extra.(protocol.BaseElement); ok {
		div.Extra = base
	}
	if builder.currentLocale != "" {
		builder.i18nBlocks[builder.currentLocale] = append(builder.i18nBlocks[builder.currentLocale], div)
	} else {
		builder.blocks = append(builder.blocks, div)
	}
	return builder
}
func (builder *CardBuilder) AddHRBlock() *CardBuilder {
	hr := &protocol.DIVBlockForm{}
	hr.Tag = protocol.HR_BLOCK
	if builder.currentLocale != "" {
		builder.i18nBlocks[builder.currentLocale] = append(builder.i18nBlocks[builder.currentLocale], hr)
	} else {
		builder.blocks = append(builder.blocks, hr)
	}
	return builder
}
func (builder *CardBuilder) AddImageBlock(title *protocol.TextForm, alt protocol.TextForm, imageKey string) *CardBuilder {
	img := &protocol.ImageBlockForm{}
	img.Tag = protocol.IMG_BLOCK
	img.Title = title
	img.Alt = alt
	img.ImageKey = imageKey
	if builder.currentLocale != "" {
		builder.i18nBlocks[builder.currentLocale] = append(builder.i18nBlocks[builder.currentLocale], img)
	} else {
		builder.blocks = append(builder.blocks, img)
	}
	return builder
}
func (builder *CardBuilder) AddActionBlock(actions []protocol.ActionElement) *CardBuilder {
	if builder.Session == nil {
		sid := uuid.New().String()
		builder.Session = &sid
	}
	act := &protocol.ActionBlockForm{}
	act.Tag = protocol.ACTION_BLOCK
	for _, a := range actions {
		a.SetSession(*builder.Session)
	}
	act.Actions = actions
	if builder.currentLocale != "" {
		builder.i18nBlocks[builder.currentLocale] = append(builder.i18nBlocks[builder.currentLocale], act)
	} else {
		builder.blocks = append(builder.blocks, act)
	}
	return builder
}