code: @SuppressWarnings({"rawtypes", "unchecked"})
      public PropertyModel<T> build() {
          if (!isReadable() && !isWritable()) {
              throw new IllegalStateException(format("Invalid PropertyModel '%s', neither readable or writable,", name));
          }
          return new PropertyModel(
                  stateNotNull("propertyName", name),
                  readName,
                  writeName,
                  stateNotNull("typeData", typeData),
                  codec,
                  stateNotNull("propertySerialization", propertySerialization),
                  discriminatorEnabled,
                  stateNotNull("propertyAccessor", propertyAccessor));
      }
docs: Creates the {@link PropertyModel}.
  
  @return the PropertyModel