// MarshalYAML implements the yaml.Marshaler interface.
176159
func (c Credential) MarshalYAML() (interface{}, error) {
	return credentialInternal{c.authType, c.attributes}, nil
}
325296
func (v *VersionInfo) MarshalYAML() (interface{}, error) {

	return &struct {
		SemVer         string `yaml:"semver"`
		ShaLong        string `yaml:"shaLong"`
		BuildTimestamp int64  `yaml:"buildTimestamp"`
		Branch         string `yaml:"branch"`
		Arch           string `yaml:"arch"`
	}{
		SemVer:         v.SemVer,
		ShaLong:        v.ShaLong,
		BuildTimestamp: v.BuildTimestamp.Unix(),
		Branch:         v.Branch,
		Arch:           v.Arch,
	}, nil
}
843513
func marshalMany(models []interface{}) (*ManyPayload, error) {
	payload := &ManyPayload{
		Data: []*Node{},
	}
	included := map[string]*Node{}

	for _, model := range models {
		node, err := visitModelNode(model, &included, true)
		if err != nil {
			return nil, err
		}
		payload.Data = append(payload.Data, node)
	}
	payload.Included = nodeMapValues(&included)

	return payload, nil
}
1354448
func (l *LocalDevices) MarshalYAML() (interface{}, error) {
	return &struct {
		Driver    string            `json:"driver" yaml:"driver"`
		DeviceMap map[string]string `json:"deviceMap,omitempty" yaml:"deviceMap,omitempty"`
	}{l.Driver, l.DeviceMap}, nil
}
1140877
func VarDefaultsFromYAML(in []byte) map[string]string {
	out := make(map[string]string)
	err := yaml.Unmarshal(in, &out)
	if err != nil {
		return make(map[string]string)
	}
	return out
}
134716
func (bm *BlockMeta) Unmarshal(bs []byte) error {
	return cdc.UnmarshalBinaryBare(bs, bm)
}
1098604
func fullOutputYAML(out io.Writer, args ...runtime.Object) error {
	for i, obj := range args {
		if i != 0 {
			if err := writeYAMLSep(out); err != nil {
				return fmt.Errorf("error writing to stdout: %v", err)
			}
		}
		if err := marshalToWriter(obj, marshalYaml, out); err != nil {
			return err
		}
	}
	return nil
}
1055337
func (l Netlist) MarshalTOML() interface{} {
	list := make([]string, 0, len(l))
	for _, net := range l {
		list = append(list, net.String())
	}
	return list
}
595870
func (m *DaemonConfigurationSpec) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
2616
func (n *External) UnmarshalYAML(unmarshal func(interface{}) error) error {
	if err := unmarshal(&n.External); err == nil {
		return nil
	}
	var dummyExternal struct {
		Name string
	}

	err := unmarshal(&dummyExternal)
	if err != nil {
		return err
	}
	n.Name = dummyExternal.Name
	n.External = true

	return nil
}
1055037
func (u Ulimits) MarshalYAML() (interface{}, error) {
	ulimitMap := make(map[string]Ulimit)
	for _, ulimit := range u.Elements {
		ulimitMap[ulimit.Name] = ulimit
	}
	return ulimitMap, nil
}
1184019
func (e External) MarshalYAML() (interface{}, error) {
	if e.Name == "" {
		return e.External, nil
	}
	return External{Name: e.Name}, nil
}
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)
}
810998
func (ia *Int64Array) MarshalJSON() ([]byte, error) {
	if ia == nil || !ia.Valid {
		return []byte("null"), nil
	}
	return json.Marshal(ia.Int64Array)
}
126187
func (s *Strings) UnmarshalYAML(unmarshal func(interface{}) error) error {
	// try unmarshal as string
	var val string
	err := unmarshal(&val)
	if err == nil {
		*s = []string{val}
		return nil
	}

	// try unmarshal as slice
	var slice []string
	err = unmarshal(&slice)
	if err == nil {
		*s = slice
		return nil
	}

	return err
}
228167
func (a *NetAddr) UnmarshalYAML(unmarshal func(interface{}) error) error {
	var addr string
	err := unmarshal(&addr)
	if err != nil {
		return err
	}

	parsedAddr, err := ParseAddr(addr)
	if err != nil {
		return err
	}

	*a = *parsedAddr
	return nil
}
270177
func (n Networks) MarshalYAML() (interface{}, error) {
	m := map[string]*Network{}
	for _, network := range n.Networks {
		m[network.Name] = network
	}
	return m, nil
}