|null $_meta @since 2024-11-05 * @param string|null $nextCursor @since 2024-11-05 */ public function __construct( ?array $_meta = null, ?string $nextCursor = null ) { parent::__construct($_meta); $this->nextCursor = $nextCursor; } /** * Creates an instance from an array. * * @param array{ * _meta?: array|null, * nextCursor?: string|null * } $data * @phpstan-param array $data * @return self */ public static function fromArray(array $data): self { return new self( self::asArrayOrNull($data['_meta'] ?? null), self::asStringOrNull($data['nextCursor'] ?? null) ); } /** * Converts the instance to an array. * * @return array */ public function toArray(): array { $result = parent::toArray(); if ($this->nextCursor !== null) { $result['nextCursor'] = $this->nextCursor; } return $result; } /** * @return string|null */ public function getNextCursor(): ?string { return $this->nextCursor; } }