// MarshalJSON method of BubbleContainer
439610
func (c *BubbleContainer) MarshalJSON() ([]byte, error) {
	return json.Marshal(&struct {
		Type      FlexContainerType       `json:"type"`
		Direction FlexBubbleDirectionType `json:"direction,omitempty"`
		Header    *BoxComponent           `json:"header,omitempty"`
		Hero      *ImageComponent         `json:"hero,omitempty"`
		Body      *BoxComponent           `json:"body,omitempty"`
		Footer    *BoxComponent           `json:"footer,omitempty"`
		Styles    *BubbleStyle            `json:"styles,omitempty"`
	}{
		Type:      FlexContainerTypeBubble,
		Direction: c.Direction,
		Header:    c.Header,
		Hero:      c.Hero,
		Body:      c.Body,
		Footer:    c.Footer,
		Styles:    c.Styles,
	})
}
433128
func (e *Event) MarshalJSON() ([]byte, error) {
	tPointer := &(e.Timestamp)
	if e.Timestamp.IsZero() {
		tPointer = nil
	}

	// don't include sample rate if it's 1; this is the default
	sampleRate := e.SampleRate
	if sampleRate == 1 {
		sampleRate = 0
	}

	return json.Marshal(struct {
		Data       marshallableMap `json:"data"`
		SampleRate uint            `json:"samplerate,omitempty"`
		Timestamp  *time.Time      `json:"time,omitempty"`
	}{e.Data, sampleRate, tPointer})
}
765100
func (i *IpamInfo) MarshalJSON() ([]byte, error) {
	m := map[string]interface{}{
		"PoolID": i.PoolID,
	}
	v, err := json.Marshal(&i.IPAMData)
	if err != nil {
		return nil, err
	}
	m["IPAMData"] = string(v)

	if i.Meta != nil {
		m["Meta"] = i.Meta
	}
	return json.Marshal(m)
}
422154
func (v Unsubscribed) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson692db02bEncodeGithubComMailgunMailgunGoEvents(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
463536
func (tokenSecret ServicePrincipalTokenSecret) MarshalJSON() ([]byte, error) {
	type tokenType struct {
		Type  string `json:"type"`
		Value string `json:"value"`
	}
	return json.Marshal(tokenType{
		Type:  "ServicePrincipalTokenSecret",
		Value: tokenSecret.ClientSecret,
	})
}
977458
func (obj *object) MarshalJSON() ([]byte, error) {
	sl := make([][2]*Term, obj.Len())
	for i := range obj.keys {
		k := obj.keys[i]
		sl[i] = Item(k, obj.get(k).value)
	}
	return json.Marshal(sl)
}
600420
func (c *IconComponent) MarshalJSON() ([]byte, error) {
	return json.Marshal(&struct {
		Type        FlexComponentType       `json:"type"`
		URL         string                  `json:"url"`
		Margin      FlexComponentMarginType `json:"margin,omitempty"`
		Size        FlexIconSizeType        `json:"size,omitempty"`
		AspectRatio FlexIconAspectRatioType `json:"aspectRatio,omitempty"`
	}{
		Type:        FlexComponentTypeIcon,
		URL:         c.URL,
		Margin:      c.Margin,
		Size:        c.Size,
		AspectRatio: c.AspectRatio,
	})
}
499878
func (v RegistryMessage) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson639f989aEncodeCodeCloudfoundryOrgGorouterMbus2(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}
1120187
func (noSecret ServicePrincipalNoSecret) MarshalJSON() ([]byte, error) {
	type tokenType struct {
		Type string `json:"type"`
	}
	return json.Marshal(tokenType{
		Type: "ServicePrincipalNoSecret",
	})
}
1174605
func (n *NodeConfig) MarshalJSON() ([]byte, error) {
	confJSON := nodeConfigJSON{
		ID:              n.ID.String(),
		Name:            n.Name,
		Services:        n.Services,
		Port:            n.Port,
		EnableMsgEvents: n.EnableMsgEvents,
	}
	if n.PrivateKey != nil {
		confJSON.PrivateKey = hex.EncodeToString(crypto.FromECDSA(n.PrivateKey))
	}
	return json.Marshal(confJSON)
}
113600
func (c *Constant) MarshalJSON() ([]byte, error) {
	return []byte(fmt.Sprintf("\"%s\"", c)), nil
}
384479
func (u *User) MarshalJSON() ([]byte, error) {
	tmp := make(map[string]interface{})

	for item := range u.Iterator() {
		tmp[item.Key] = item.Val
	}
	return json.Marshal(tmp)
}
1193589
func (s Scalar) MarshalJSON() ([]byte, error) {
	v := strconv.FormatFloat(float64(s.Value), 'f', -1, 64)
	return json.Marshal([...]interface{}{s.Timestamp, string(v)})
}
564982
func (aSpace *addrSpace) MarshalJSON() ([]byte, error) {
	aSpace.Lock()
	defer aSpace.Unlock()

	m := map[string]interface{}{
		"Scope": string(aSpace.scope),
	}

	if aSpace.subnets != nil {
		s := map[string]*PoolData{}
		for k, v := range aSpace.subnets {
			s[k.String()] = v
		}
		m["Subnets"] = s
	}

	return json.Marshal(m)
}
118942
func (i *IPAMData) MarshalJSON() ([]byte, error) {
	m := map[string]interface{}{}
	m["AddressSpace"] = i.AddressSpace
	if i.Pool != nil {
		m["Pool"] = i.Pool.String()
	}
	if i.Gateway != nil {
		m["Gateway"] = i.Gateway.String()
	}
	if i.AuxAddresses != nil {
		am := make(map[string]string, len(i.AuxAddresses))
		for k, v := range i.AuxAddresses {
			am[k] = v.String()
		}
		m["AuxAddresses"] = am
	}
	return json.Marshal(m)
}
358511
func (a *MessageImagemapAction) MarshalJSON() ([]byte, error) {
	return json.Marshal(&struct {
		Type ImagemapActionType `json:"type"`
		Text string             `json:"text"`
		Area ImagemapArea       `json:"area"`
	}{
		Type: ImagemapActionTypeMessage,
		Text: a.Text,
		Area: a.Area,
	})
}
434336
func (dt *DateTime) MarshalJSON() ([]byte, error) {
	return []byte(time.Time(*dt).Format(dateTimeFmtTicked)), nil
}