code: func (s *RecordSchema) Validate(v reflect.Value) bool {
  	v = dereference(v)
  	if v.Kind() != reflect.Struct || !v.CanAddr() || !v.CanInterface() {
  		return false
  	}
  	rec, ok := v.Interface().(GenericRecord)
  	if !ok {
  		// This is not a generic record and is likely a specific record. Hence
  		// use the basic check.
  		return v.Kind() == reflect.Struct
  	}
  
  	fieldCount := 0
  	for key, val := range rec.fields {
  		for idx := range s.Fields {
  			// key.Name must have rs.Fields[idx].Name as a suffix
  			if len(s.Fields[idx].Name) <= len(key) {
  				lhs := key[len(key)-len(s.Fields[idx].Name) : len(key)]
  				if lhs == s.Fields[idx].Name {
  					if !s.Fields[idx].Type.Validate(reflect.ValueOf(val)) {
  						return false
  					}
  					fieldCount++
  					break
  				}
  			}
  		}
  	}
  
  	// All of the fields set must be accounted for in the union.
  	if fieldCount < len(rec.fields) {
  		return false
  	}
  
  	return true
  }
docs: // Validate checks whether the given value is writeable to this schema.