<?php
/**
 * Recording workspace creation request.
 *
 * @package ScheduledChanges
 */

namespace ScheduledChanges\Recording;

use ScheduledChanges\Domain\Shared\Uuid;

/**
 * Immutable input for provider-owned recording workspace creation.
 */
final class RecordingWorkspaceRequest {
	private Uuid $session_uuid;
	private int $source_id;
	private int $owner_id;

	public function __construct( Uuid $session_uuid, int $source_id, int $owner_id ) {
		if ( $source_id <= 0 ) {
			throw new \InvalidArgumentException( 'Recording workspace source ID must be positive.' );
		}

		if ( $owner_id < 0 ) {
			throw new \InvalidArgumentException( 'Recording workspace owner ID cannot be negative.' );
		}

		$this->session_uuid = $session_uuid;
		$this->source_id    = $source_id;
		$this->owner_id     = $owner_id;
	}

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

	public function sourceId(): int {
		return $this->source_id;
	}

	public function ownerId(): int {
		return $this->owner_id;
	}
}
