<?php
/**
 * Provider rollback context.
 *
 * @package ScheduledChanges
 */

namespace ScheduledChanges\Provider;

use ScheduledChanges\Domain\Shared\Uuid;

/**
 * Immutable details available while restoring a provider snapshot.
 */
final class RollbackContext {
	private Uuid $runUuid;
	private bool $force       = false;
	private ?int $actorUserId = null;
	public function __construct( Uuid $runUuid, bool $force = false, ?int $actorUserId = null ) {
		$this->runUuid     = $runUuid;
		$this->force       = $force;
		$this->actorUserId = $actorUserId;
	}

	public function runUuid(): Uuid {
		return $this->runUuid;
	}

	public function force(): bool {
		return $this->force;
	}

	public function actorUserId(): ?int {
		return $this->actorUserId;
	}
}
