id; } /** * Assign id after insert. * * @param int $id Database id. * * @since 0.1.0 */ public function assign_id( int $id ): void { $this->id = $id; } /** * Uuid. * * @since 0.1.0 */ public function uuid(): Uuid { return $this->uuid; } /** * Key. * * @since 0.1.0 */ public function key(): string { return $this->key; } /** * Channel. * * @since 0.1.0 */ public function channel(): string { return $this->channel; } /** * Recipient. * * @since 0.1.0 */ public function recipient(): RecipientRole { return $this->recipient; } /** * Custom recipient. * * @since 0.1.0 */ public function custom_recipient(): ?string { return $this->custom_recipient; } /** * Subject. * * @since 0.1.0 */ public function subject(): ?string { return $this->subject; } /** * Body. * * @since 0.1.0 */ public function body(): ?string { return $this->body; } /** * Is enabled. * * @since 0.1.0 */ public function is_enabled(): bool { return $this->is_enabled; } /** * Locale. * * @since 0.1.0 */ public function locale(): string { return $this->locale; } /** * Created at. * * @since 0.1.0 */ public function created_at(): DateTimeImmutable { return $this->created_at; } /** * Updated at. * * @since 0.1.0 */ public function updated_at(): DateTimeImmutable { return $this->updated_at; } /** * Copy with edited content (M11 editor). * * @param string|null $subject Subject. * @param string|null $body HTML body. * @param bool $is_enabled Enabled. * @param DateTimeImmutable $updated_at Updated UTC. * * @since 0.1.0 */ public function with_content( ?string $subject, ?string $body, bool $is_enabled, DateTimeImmutable $updated_at ): self { return new self( $this->id, $this->uuid, $this->key, $this->channel, $this->recipient, $this->custom_recipient, $subject, $body, $is_enabled, $this->locale, $this->created_at, $updated_at, ); } }