| 1 | <?php |
||
| 7 | class Tone implements ApiResponseInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | private $toneId; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | private $name; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var double |
||
| 21 | */ |
||
| 22 | private $score; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Tone constructor. |
||
| 26 | * |
||
| 27 | * @param string $toneId |
||
| 28 | * @param string $name |
||
| 29 | * @param double $score |
||
| 30 | */ |
||
| 31 | 6 | public function __construct($toneId, $name, $score) |
|
| 37 | |||
| 38 | /** |
||
| 39 | * Create tone |
||
| 40 | * |
||
| 41 | * @param array $data |
||
| 42 | * |
||
| 43 | * @return \IBM\Watson\ToneAnalyzer\Model\Tone |
||
| 44 | */ |
||
| 45 | 6 | public static function create(array $data) |
|
| 49 | |||
| 50 | /** |
||
| 51 | * Get tone id |
||
| 52 | * |
||
| 53 | * @return string |
||
| 54 | */ |
||
| 55 | 3 | public function getId() |
|
| 59 | |||
| 60 | /** |
||
| 61 | * Get tone name |
||
| 62 | * |
||
| 63 | * @return string |
||
| 64 | */ |
||
| 65 | 3 | public function getName() |
|
| 69 | |||
| 70 | /** |
||
| 71 | * Get tone score |
||
| 72 | * |
||
| 73 | * @return float |
||
| 74 | */ |
||
| 75 | 3 | public function getScore() |
|
| 79 | } |
||
| 80 |