|
| 1 | +<?php |
| 2 | +/* |
| 3 | + * Copyright 2014 Google Inc. |
| 4 | + * |
| 5 | + * Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 6 | + * use this file except in compliance with the License. You may obtain a copy of |
| 7 | + * the License at |
| 8 | + * |
| 9 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | + * |
| 11 | + * Unless required by applicable law or agreed to in writing, software |
| 12 | + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 13 | + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 14 | + * License for the specific language governing permissions and limitations under |
| 15 | + * the License. |
| 16 | + */ |
| 17 | + |
| 18 | +namespace Google\Service\Texttospeech; |
| 19 | + |
| 20 | +class SafetySetting extends \Google\Model |
| 21 | +{ |
| 22 | + /** |
| 23 | + * Default value. This value is unused. |
| 24 | + */ |
| 25 | + public const CATEGORY_HARM_CATEGORY_UNSPECIFIED = 'HARM_CATEGORY_UNSPECIFIED'; |
| 26 | + /** |
| 27 | + * Content that promotes violence or incites hatred against individuals or |
| 28 | + * groups based on certain attributes. |
| 29 | + */ |
| 30 | + public const CATEGORY_HARM_CATEGORY_HATE_SPEECH = 'HARM_CATEGORY_HATE_SPEECH'; |
| 31 | + /** |
| 32 | + * Content that promotes, facilitates, or enables dangerous activities. |
| 33 | + */ |
| 34 | + public const CATEGORY_HARM_CATEGORY_DANGEROUS_CONTENT = 'HARM_CATEGORY_DANGEROUS_CONTENT'; |
| 35 | + /** |
| 36 | + * Abusive, threatening, or content intended to bully, torment, or ridicule. |
| 37 | + */ |
| 38 | + public const CATEGORY_HARM_CATEGORY_HARASSMENT = 'HARM_CATEGORY_HARASSMENT'; |
| 39 | + /** |
| 40 | + * Content that contains sexually explicit material. |
| 41 | + */ |
| 42 | + public const CATEGORY_HARM_CATEGORY_SEXUALLY_EXPLICIT = 'HARM_CATEGORY_SEXUALLY_EXPLICIT'; |
| 43 | + /** |
| 44 | + * The harm block threshold is unspecified. |
| 45 | + */ |
| 46 | + public const THRESHOLD_HARM_BLOCK_THRESHOLD_UNSPECIFIED = 'HARM_BLOCK_THRESHOLD_UNSPECIFIED'; |
| 47 | + /** |
| 48 | + * Block content with a low harm probability or higher. |
| 49 | + */ |
| 50 | + public const THRESHOLD_BLOCK_LOW_AND_ABOVE = 'BLOCK_LOW_AND_ABOVE'; |
| 51 | + /** |
| 52 | + * Block content with a medium harm probability or higher. |
| 53 | + */ |
| 54 | + public const THRESHOLD_BLOCK_MEDIUM_AND_ABOVE = 'BLOCK_MEDIUM_AND_ABOVE'; |
| 55 | + /** |
| 56 | + * Block content with a high harm probability. |
| 57 | + */ |
| 58 | + public const THRESHOLD_BLOCK_ONLY_HIGH = 'BLOCK_ONLY_HIGH'; |
| 59 | + /** |
| 60 | + * Do not block any content, regardless of its harm probability. |
| 61 | + */ |
| 62 | + public const THRESHOLD_BLOCK_NONE = 'BLOCK_NONE'; |
| 63 | + /** |
| 64 | + * Turn off the safety filter entirely. |
| 65 | + */ |
| 66 | + public const THRESHOLD_OFF = 'OFF'; |
| 67 | + /** |
| 68 | + * The harm category to apply the safety setting to. |
| 69 | + * |
| 70 | + * @var string |
| 71 | + */ |
| 72 | + public $category; |
| 73 | + /** |
| 74 | + * The harm block threshold for the safety setting. |
| 75 | + * |
| 76 | + * @var string |
| 77 | + */ |
| 78 | + public $threshold; |
| 79 | + |
| 80 | + /** |
| 81 | + * The harm category to apply the safety setting to. |
| 82 | + * |
| 83 | + * Accepted values: HARM_CATEGORY_UNSPECIFIED, HARM_CATEGORY_HATE_SPEECH, |
| 84 | + * HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT, |
| 85 | + * HARM_CATEGORY_SEXUALLY_EXPLICIT |
| 86 | + * |
| 87 | + * @param self::CATEGORY_* $category |
| 88 | + */ |
| 89 | + public function setCategory($category) |
| 90 | + { |
| 91 | + $this->category = $category; |
| 92 | + } |
| 93 | + /** |
| 94 | + * @return self::CATEGORY_* |
| 95 | + */ |
| 96 | + public function getCategory() |
| 97 | + { |
| 98 | + return $this->category; |
| 99 | + } |
| 100 | + /** |
| 101 | + * The harm block threshold for the safety setting. |
| 102 | + * |
| 103 | + * Accepted values: HARM_BLOCK_THRESHOLD_UNSPECIFIED, BLOCK_LOW_AND_ABOVE, |
| 104 | + * BLOCK_MEDIUM_AND_ABOVE, BLOCK_ONLY_HIGH, BLOCK_NONE, OFF |
| 105 | + * |
| 106 | + * @param self::THRESHOLD_* $threshold |
| 107 | + */ |
| 108 | + public function setThreshold($threshold) |
| 109 | + { |
| 110 | + $this->threshold = $threshold; |
| 111 | + } |
| 112 | + /** |
| 113 | + * @return self::THRESHOLD_* |
| 114 | + */ |
| 115 | + public function getThreshold() |
| 116 | + { |
| 117 | + return $this->threshold; |
| 118 | + } |
| 119 | +} |
| 120 | + |
| 121 | +// Adding a class alias for backwards compatibility with the previous class name. |
| 122 | +class_alias(SafetySetting::class, 'Google_Service_Texttospeech_SafetySetting'); |
0 commit comments