setFields = $setFields; } /** * Create an instance of PollerV2CommitIn with required fields. */ public static function create( int $offset, ): self { return new self( offset: $offset, setFields: ['offset' => true] ); } public function jsonSerialize(): mixed { $data = [ 'offset' => $this->offset]; return \Svix\Utils::newStdClassIfArrayIsEmpty($data); } /** * Create an instance from a mixed obj. */ public static function fromMixed(mixed $data): self { return new self( offset: \Svix\Utils::deserializeInt($data, 'offset', true, 'PollerV2CommitIn') ); } /** * Create an instance from a json string. */ public static function fromJson(string $json): self { $data = json_decode(json: $json, associative: true, depth: 512, flags: JSON_THROW_ON_ERROR); return self::fromMixed($data); } }