code: function createField(kind) {
    if (!fields.has(kind)) {
      let type;
      switch (kind) {
        case DynamicFieldKind.STRING_VAL.toString():
          type = StringType.create();
          break;
  
        case DynamicFieldKind.TEXT_VAL.toString():
          type = TextType.create();
          break;
  
        case DynamicFieldKind.INT_VAL.toString():
          type = IntType.create();
          break;
  
        case DynamicFieldKind.BOOL_VAL.toString():
          type = BooleanType.create();
          break;
  
        case DynamicFieldKind.FLOAT_VAL.toString():
          type = FloatType.create();
          break;
  
        case DynamicFieldKind.DATE_VAL.toString():
          type = DateType.create();
          break;
  
        default:
          throw new AssertionFailed(`DynamicField "${kind}" is not a valid type.`);
      }
  
      fields.set(
        kind, new Field({ name: kind, type, rule: FieldRule.A_SINGLE_VALUE, required: true }),
      );
    }
  
    return fields.get(kind);
  }
docs: @param {string} kind
  
  @returns {Field}