| @@ 5-131 (lines=127) @@ | ||
| 2 | ||
| 3 | namespace GroupByInc\API\Model; |
|
| 4 | ||
| 5 | class Biasing |
|
| 6 | { |
|
| 7 | /** |
|
| 8 | * @var string[] |
|
| 9 | */ |
|
| 10 | private $bringToTop = array(); |
|
| 11 | ||
| 12 | /** |
|
| 13 | * @var bool |
|
| 14 | */ |
|
| 15 | private $augmentBiases = false; |
|
| 16 | ||
| 17 | /** |
|
| 18 | * @var float|null |
|
| 19 | */ |
|
| 20 | private $influence = null; |
|
| 21 | ||
| 22 | /** |
|
| 23 | * @var NumericBoost[] |
|
| 24 | */ |
|
| 25 | private $numericBoosts = array(); |
|
| 26 | ||
| 27 | /** |
|
| 28 | * @var Bias[] |
|
| 29 | */ |
|
| 30 | private $biases = array(); |
|
| 31 | ||
| 32 | ||
| 33 | /** |
|
| 34 | * @return string[] The list of product IDs |
|
| 35 | */ |
|
| 36 | public function getBringToTop() |
|
| 37 | { |
|
| 38 | return $this->bringToTop; |
|
| 39 | } |
|
| 40 | ||
| 41 | /** |
|
| 42 | * A list of product IDs to bring to the top of the result set. This list |
|
| 43 | * will ensure that the products are included in the result set and appear in the order |
|
| 44 | * defined. |
|
| 45 | * |
|
| 46 | * @param string[] $bringToTop The list of productIds. |
|
| 47 | * |
|
| 48 | * @return Biasing |
|
| 49 | */ |
|
| 50 | public function setBringToTop($bringToTop) |
|
| 51 | { |
|
| 52 | $this->bringToTop = $bringToTop; |
|
| 53 | return $this; |
|
| 54 | } |
|
| 55 | ||
| 56 | /** |
|
| 57 | * @return boolean |
|
| 58 | */ |
|
| 59 | public function isAugmentBiases() |
|
| 60 | { |
|
| 61 | return $this->augmentBiases; |
|
| 62 | } |
|
| 63 | ||
| 64 | /** |
|
| 65 | * @param boolean $augmentBiases |
|
| 66 | * |
|
| 67 | * @return Biasing |
|
| 68 | */ |
|
| 69 | public function setAugmentBiases($augmentBiases) |
|
| 70 | { |
|
| 71 | $this->augmentBiases = $augmentBiases; |
|
| 72 | return $this; |
|
| 73 | } |
|
| 74 | ||
| 75 | /** |
|
| 76 | * @return float|null |
|
| 77 | */ |
|
| 78 | public function getInfluence() |
|
| 79 | { |
|
| 80 | return $this->influence; |
|
| 81 | } |
|
| 82 | ||
| 83 | /** |
|
| 84 | * @param float|null $influence |
|
| 85 | * |
|
| 86 | * @return Biasing |
|
| 87 | */ |
|
| 88 | public function setInfluence($influence) |
|
| 89 | { |
|
| 90 | $this->influence = $influence; |
|
| 91 | return $this; |
|
| 92 | } |
|
| 93 | ||
| 94 | /** |
|
| 95 | * @return NumericBoost[] |
|
| 96 | */ |
|
| 97 | public function getNumericBoosts() |
|
| 98 | { |
|
| 99 | return $this->numericBoosts; |
|
| 100 | } |
|
| 101 | ||
| 102 | /** |
|
| 103 | * @param NumericBoost[] $numericBoosts |
|
| 104 | * |
|
| 105 | * @return Biasing |
|
| 106 | */ |
|
| 107 | public function setNumericBoosts($numericBoosts) |
|
| 108 | { |
|
| 109 | $this->numericBoosts = $numericBoosts; |
|
| 110 | return $this; |
|
| 111 | } |
|
| 112 | ||
| 113 | /** |
|
| 114 | * @return Bias[] |
|
| 115 | */ |
|
| 116 | public function getBiases() |
|
| 117 | { |
|
| 118 | return $this->biases; |
|
| 119 | } |
|
| 120 | ||
| 121 | /** |
|
| 122 | * @param Bias[] $biases |
|
| 123 | * |
|
| 124 | * @return Biasing |
|
| 125 | */ |
|
| 126 | public function setBiases($biases) |
|
| 127 | { |
|
| 128 | $this->biases = $biases; |
|
| 129 | return $this; |
|
| 130 | } |
|
| 131 | } |
|
| @@ 7-126 (lines=120) @@ | ||
| 4 | ||
| 5 | use JMS\Serializer\Annotation as JMS; |
|
| 6 | ||
| 7 | class Biasing |
|
| 8 | { |
|
| 9 | /** |
|
| 10 | * @var string[] |
|
| 11 | * @JMS\Type("array<string>") |
|
| 12 | */ |
|
| 13 | private $bringToTop = array(); |
|
| 14 | ||
| 15 | /** |
|
| 16 | * @var bool |
|
| 17 | * @JMS\Type("boolean") |
|
| 18 | */ |
|
| 19 | private $augmentBiases = false; |
|
| 20 | ||
| 21 | /** |
|
| 22 | * @var float|null |
|
| 23 | * @JMS\Type("float") |
|
| 24 | */ |
|
| 25 | private $influence = null; |
|
| 26 | ||
| 27 | /** |
|
| 28 | * @var Bias[] |
|
| 29 | * @JMS\Type("array<GroupByInc\API\Request\Bias>") |
|
| 30 | */ |
|
| 31 | private $biases = array(); |
|
| 32 | ||
| 33 | /** |
|
| 34 | * @var NumericBoost[] |
|
| 35 | * @JMS\Type("array<GroupByInc\API\Request\NumericBoost>") |
|
| 36 | */ |
|
| 37 | private $numericBoosts = array(); |
|
| 38 | ||
| 39 | /** |
|
| 40 | * @return string[] |
|
| 41 | */ |
|
| 42 | public function getBringToTop() |
|
| 43 | { |
|
| 44 | return $this->bringToTop; |
|
| 45 | } |
|
| 46 | ||
| 47 | /** |
|
| 48 | * @param string[] $bringToTop |
|
| 49 | * |
|
| 50 | * @return Biasing |
|
| 51 | */ |
|
| 52 | public function setBringToTop($bringToTop) |
|
| 53 | { |
|
| 54 | $this->bringToTop = $bringToTop; |
|
| 55 | return $this; |
|
| 56 | } |
|
| 57 | ||
| 58 | /** |
|
| 59 | * @return boolean |
|
| 60 | */ |
|
| 61 | public function isAugmentBiases() |
|
| 62 | { |
|
| 63 | return $this->augmentBiases; |
|
| 64 | } |
|
| 65 | ||
| 66 | /** |
|
| 67 | * @param boolean $augmentBiases |
|
| 68 | * |
|
| 69 | * @return Biasing |
|
| 70 | */ |
|
| 71 | public function setAugmentBiases($augmentBiases) |
|
| 72 | { |
|
| 73 | $this->augmentBiases = $augmentBiases; |
|
| 74 | return $this; |
|
| 75 | } |
|
| 76 | ||
| 77 | /** |
|
| 78 | * @return float|null |
|
| 79 | */ |
|
| 80 | public function getInfluence() |
|
| 81 | { |
|
| 82 | return $this->influence; |
|
| 83 | } |
|
| 84 | ||
| 85 | /** |
|
| 86 | * @param float|null $influence |
|
| 87 | * |
|
| 88 | * @return Biasing |
|
| 89 | */ |
|
| 90 | public function setInfluence($influence) |
|
| 91 | { |
|
| 92 | $this->influence = $influence; |
|
| 93 | return $this; |
|
| 94 | } |
|
| 95 | ||
| 96 | /** |
|
| 97 | * @return NumericBoost[] |
|
| 98 | */ |
|
| 99 | public function getNumericBoosts() |
|
| 100 | { |
|
| 101 | return $this->numericBoosts; |
|
| 102 | } |
|
| 103 | ||
| 104 | /** |
|
| 105 | * @param NumericBoost[] $numericBoosts |
|
| 106 | * |
|
| 107 | * @return Biasing |
|
| 108 | */ |
|
| 109 | public function setNumericBoosts($numericBoosts) |
|
| 110 | { |
|
| 111 | $this->numericBoosts = $numericBoosts; |
|
| 112 | return $this; |
|
| 113 | } |
|
| 114 | ||
| 115 | /** |
|
| 116 | * @return Bias[] |
|
| 117 | */ |
|
| 118 | public function getBiases() |
|
| 119 | { |
|
| 120 | return $this->biases; |
|
| 121 | } |
|
| 122 | ||
| 123 | /** |
|
| 124 | * @param Bias[] $biases |
|
| 125 | * |
|
| 126 | * @return Biasing |
|
| 127 | */ |
|
| 128 | public function setBiases($biases) |
|
| 129 | { |
|