code: func (b *Build) UnmarshalYAML(unmarshal func(interface{}) error) error {
  	var stringType string
  	if err := unmarshal(&stringType); err == nil {
  		b.Context = stringType
  		return nil
  	}
  
  	var mapType map[interface{}]interface{}
  	if err := unmarshal(&mapType); err == nil {
  		for mapKey, mapValue := range mapType {
  			switch mapKey {
  			case "context":
  				b.Context = mapValue.(string)
  			case "dockerfile":
  				b.Dockerfile = mapValue.(string)
  			case "args":
  				args, err := handleBuildArgs(mapValue)
  				if err != nil {
  					return err
  				}
  				b.Args = args
  			case "cache_from":
  				cacheFrom, err := handleBuildCacheFrom(mapValue)
  				if err != nil {
  					return err
  				}
  				b.CacheFrom = cacheFrom
  			case "labels":
  				labels, err := handleBuildLabels(mapValue)
  				if err != nil {
  					return err
  				}
  				b.Labels = labels
  			case "target":
  				b.Target = mapValue.(string)
  			case "network":
  				b.Network = mapValue.(string)
  			default:
  				// Ignore unknown keys
  				continue
  			}
  		}
  		return nil
  	}
  
  	return errors.New("Failed to unmarshal Build")
  }
docs: // UnmarshalYAML implements the Unmarshaller interface.