<?php

namespace Planaday\Entities\Course\DTO;

class ApiAttributeValue {
	protected string $name = '';
	protected string $value = '';
	protected string $description = '';

	public function setName( ?string $name ): self {
		$this->name = $name ?? $this->name;

		return $this;
	}

	public function setValue( ?string $value ): self {
		$this->value = $value ?? $this->value;

		return $this;
	}

	public function setDescription( ?string $description ): self {
		$this->description = $description ?? $this->description;

		return $this;
	}

	public function getName(): string {
		return $this->name;
	}

	public function getValue(): string {
		if (empty( $this->value ))
			return $this->name;
		return $this->value;
	}

	public function getDescription(): string {
		return $this->description;
	}
}