func (a *EntryAttributes) SetMode(mode os.FileMode) *EntryAttributes {
	a.mode = mode
	a.hasMode = true
	return a
}
SetMode sets the entry's mode
package plugin
import (
	"encoding/json"
	"fmt"
	"os"
	"time"
	"github.com/Benchkram/errz"
	"github.com/puppetlabs/wash/munge"
)
type JSONObject = map[string]interface{}
func ToJSONObject(v interface{}) JSONObject {
	if obj, ok := v.(JSONObject); ok {
		return obj
	}
	var err error
	var inrec []byte
	if arr, ok := v.([]byte); ok {
		inrec = arr
	} else {
		if inrec, err = json.Marshal(v); err != nil {
			panic(err)
		}
	}
	var obj JSONObject
	errz.Fatal(json.Unmarshal(inrec, &obj))
	return obj
}
type Shell int
const (
	UnknownShell Shell = iota
	POSIXShell
	PowerShell
)
var shellNames = [3]string{"unknown", "posixshell", "powershell"}
func (sh Shell) String() string {
	return shellNames[sh]
}
type OS struct {
	LoginShell Shell
}
func (o OS) ToMap() map[string]interface{} {
	return map[string]interface{}{
		"login_shell": o.LoginShell.String(),
	}
}
type EntryAttributes struct {
	atime   time.Time
	mtime   time.Time
	ctime   time.Time
	crtime  time.Time
	os      OS
	hasOS   bool  
	mode    os.FileMode
	hasMode bool
	size    uint64
	hasSize bool
}
func (a *EntryAttributes) HasAtime() bool {
	return !a.atime.IsZero()
}
func (a *EntryAttributes) Atime() time.Time {
	return a.atime
}
func (a *EntryAttributes) SetAtime(atime time.Time) *EntryAttributes {
	a.atime = atime
	return a
}
func (a *EntryAttributes) HasMtime() bool {
	return !a.mtime.IsZero()
}
func (a *EntryAttributes) Mtime() time.Time {
	return a.mtime
}
func (a *EntryAttributes) SetMtime(mtime time.Time) *EntryAttributes {
	a.mtime = mtime
	return a
}
func (a *EntryAttributes) HasCtime() bool {
	return !a.ctime.IsZero()
}
func (a *EntryAttributes) Ctime() time.Time {
	return a.ctime
}
func (a *EntryAttributes) SetCtime(ctime time.Time) *EntryAttributes {
	a.ctime = ctime
	return a
}
func (a *EntryAttributes) HasCrtime() bool {
	return !a.crtime.IsZero()
}
func (a *EntryAttributes) Crtime() time.Time {
	return a.crtime
}
func (a *EntryAttributes) SetCrtime(crtime time.Time) *EntryAttributes {
	a.crtime = crtime
	return a
}
func (a *EntryAttributes) HasOS() bool {
	return a.hasOS
}
func (a *EntryAttributes) OS() OS {
	return a.os
}
func (a *EntryAttributes) SetOS(os OS) *EntryAttributes {
	a.os = os
	a.hasOS = true
	return a
}
func (a *EntryAttributes) HasMode() bool {
	return a.hasMode
}
func (a *EntryAttributes) Mode() os.FileMode {
	return a.mode
}