code: public function withEncoding(
          int $options = 0,
          int $depth = 512,
          string $mediaType = MediaTypeInterface::JSON_API_MEDIA_TYPE
      ) {
          $encoding = Encoding::create(
              $mediaType,
              $options,
              $this->api->getUrl()->toString(),
              $depth
          );
  
          $codec = $this->factory->createCodec(
              $this->api->getContainer(),
              $encoding,
              null
          );
  
          return $this->withCodec($codec);
      }
docs: Set the encoding options.
  
  @param int $options
  @param int $depth
  @param string|null $mediaType
  @return Responses