google.cloud.translation.v3.SupportedLanguage */ class SupportedLanguage extends \Google\Protobuf\Internal\Message { /** * Supported language code, generally consisting of its ISO 639-1 * identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes * including language and region identifiers are returned (for example, * 'zh-TW' and 'zh-CN') * * Generated from protobuf field string language_code = 1; */ private $language_code = ''; /** * Human readable name of the language localized in the display language * specified in the request. * * Generated from protobuf field string display_name = 2; */ private $display_name = ''; /** * Can be used as source language. * * Generated from protobuf field bool support_source = 3; */ private $support_source = false; /** * Can be used as target language. * * Generated from protobuf field bool support_target = 4; */ private $support_target = false; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type string $language_code * Supported language code, generally consisting of its ISO 639-1 * identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes * including language and region identifiers are returned (for example, * 'zh-TW' and 'zh-CN') * @type string $display_name * Human readable name of the language localized in the display language * specified in the request. * @type bool $support_source * Can be used as source language. * @type bool $support_target * Can be used as target language. * } */ public function __construct($data = NULL) { \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce(); parent::__construct($data); } /** * Supported language code, generally consisting of its ISO 639-1 * identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes * including language and region identifiers are returned (for example, * 'zh-TW' and 'zh-CN') * * Generated from protobuf field string language_code = 1; * @return string */ public function getLanguageCode() { return $this->language_code; } /** * Supported language code, generally consisting of its ISO 639-1 * identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes * including language and region identifiers are returned (for example, * 'zh-TW' and 'zh-CN') * * Generated from protobuf field string language_code = 1; * @param string $var * @return $this */ public function setLanguageCode($var) { GPBUtil::checkString($var, True); $this->language_code = $var; return $this; } /** * Human readable name of the language localized in the display language * specified in the request. * * Generated from protobuf field string display_name = 2; * @return string */ public function getDisplayName() { return $this->display_name; } /** * Human readable name of the language localized in the display language * specified in the request. * * Generated from protobuf field string display_name = 2; * @param string $var * @return $this */ public function setDisplayName($var) { GPBUtil::checkString($var, True); $this->display_name = $var; return $this; } /** * Can be used as source language. * * Generated from protobuf field bool support_source = 3; * @return bool */ public function getSupportSource() { return $this->support_source; } /** * Can be used as source language. * * Generated from protobuf field bool support_source = 3; * @param bool $var * @return $this */ public function setSupportSource($var) { GPBUtil::checkBool($var); $this->support_source = $var; return $this; } /** * Can be used as target language. * * Generated from protobuf field bool support_target = 4; * @return bool */ public function getSupportTarget() { return $this->support_target; } /** * Can be used as target language. * * Generated from protobuf field bool support_target = 4; * @param bool $var * @return $this */ public function setSupportTarget($var) { GPBUtil::checkBool($var); $this->support_target = $var; return $this; } }