<commit_before><?php
namespace Fortifi\Sdk\Models\Meta;

use Fortifi\FortifiApi\Meta\Payloads\GetMetaDataPayload;
use Fortifi\FortifiApi\Meta\Payloads\MetaDataPayload;
use Fortifi\FortifiApi\Meta\Endpoints\MetaDataEndpoint;
use Fortifi\FortifiApi\Meta\Responses\MetaDataResponse;
use Fortifi\FortifiApi\Foundation\Requests\FortifiApiRequestInterface;
use Fortifi\FortifiApi\Foundation\Responses\BoolResponse;
use Fortifi\Sdk\Models\Api\FortifiApiModel;

class MetaModel extends FortifiApiModel
{
  /**
   * @param string       $objectFid
   * @param array|string $filter
   *
   * @return MetaDataResponse|FortifiApiRequestInterface
   */
  public function getMetaData($objectFid, $filter = null)
  {
    $payload            = new GetMetaDataPayload();
    $payload->objectFid = $objectFid;
    $payload->filter    = $filter;

    $ep = MetaDataEndpoint::bound($this->getApi());
    return $ep->getMetaData($payload)->get();
  }

  /**
   * @param $objectFid
   * @param $key
   * @param $value
   *
   * @return FortifiApiRequestInterface|BoolResponse
   */
  public function setMetaDatum($objectFid, $key, $value)
  {
    $payload            = new MetaDataPayload();
    $payload->objectFid = $objectFid;
    $payload->key       = $key;<commit_msg>Ref T389 refactor method name<commit_after><?php
namespace Fortifi\Sdk\Models\Meta;

use Fortifi\FortifiApi\Meta\Payloads\GetMetaDataPayload;
use Fortifi\FortifiApi\Meta\Payloads\MetaDataPayload;
use Fortifi\FortifiApi\Meta\Endpoints\MetaDataEndpoint;
use Fortifi\FortifiApi\Meta\Responses\MetaDataResponse;
use Fortifi\FortifiApi\Foundation\Requests\FortifiApiRequestInterface;
use Fortifi\FortifiApi\Foundation\Responses\BoolResponse;
use Fortifi\Sdk\Models\Api\FortifiApiModel;

class MetaModel extends FortifiApiModel
{
  /**
   * @param string       $objectFid
   * @param array|string $filter
   *
   * @return MetaDataResponse|FortifiApiRequestInterface
   */
  public function getMetaData($objectFid, $filter = null)
  {
    $payload            = new GetMetaDataPayload();
    $payload->objectFid = $objectFid;
    $payload->filter    = $filter;

    $ep = MetaDataEndpoint::bound($this->getApi());
    return $ep->getMetaData($payload)->get();
  }

  /**
   * @param $objectFid
   * @param $key
   * @param $value
   *
   * @return FortifiApiRequestInterface|BoolResponse
   */
  public function setMetaData($objectFid, $key, $value)
  {
    $payload            = new MetaDataPayload();
    $payload->objectFid = $objectFid;
    $payload->key       = $key;
{'fraction_non_alphanumeric': 0.12087475149105367, 'fraction_numerical': 0.0011928429423459245, 'mean_word_length': 3.962524654832347, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2736280', 'n_tokens_mistral': 813, 'n_tokens_neox': 806, 'n_words': 133}