public function __construct()

in src/WorkplaceSearch/Schema/SyncJobDefinition.php [33:51]


	public function __construct(
		string $id,
		string $job_type,
		string $status,
		string $created_at,
		string $last_updated_at,
	) {
		$this->id = $id;
		if (!in_array($job_type, ['full','incremental','delete','permissions'])) {
			throw new InvalidArgumentException('The $job_type parameter must be one of these values: full,incremental,delete,permissions');
		}
		$this->job_type = $job_type;
		if (!in_array($status, ['enqueued','running','suspended','failed','complete'])) {
			throw new InvalidArgumentException('The $status parameter must be one of these values: enqueued,running,suspended,failed,complete');
		}
		$this->status = $status;
		$this->created_at = $created_at;
		$this->last_updated_at = $last_updated_at;
	}