code: func newEnum(structName string, prop raml.Property, pkg string, fromStruct bool) *enum {
  	e := enum{
  		Name: strings.Title(structName) + strings.Title(prop.Name),
  		Type: convertToGoType(prop.TypeString(), prop.Items.Type),
  		Pkg:  pkg,
  	}
  	if !fromStruct {
  		e.Name = "Enum" + e.Name
  	}
  	for _, v := range prop.Enum.([]interface{}) {
  		e.Fields = append(e.Fields, newEnumField(v, e))
  	}
  	return &e
  }
docs: // creates new enum representation.
  //
  // structName : name of the struct on which this enum reside
  // prop : ramlProperty that describe this enum
  // pkg : package name
  // fromStruct: true if this enum come from struct, false if come from struct's field