<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dialogflow/cx/v3/safety_settings.proto

namespace Google\Cloud\Dialogflow\Cx\V3\SafetySettings;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Text input which can be used for prompt or banned phrases.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.cx.v3.SafetySettings.Phrase</code>
 */
class Phrase extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Text input which can be used for prompt or banned phrases.
     *
     * Generated from protobuf field <code>string text = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $text = '';
    /**
     * Required. Language code of the phrase.
     *
     * Generated from protobuf field <code>string language_code = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $language_code = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $text
     *           Required. Text input which can be used for prompt or banned phrases.
     *     @type string $language_code
     *           Required. Language code of the phrase.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\SafetySettings::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Text input which can be used for prompt or banned phrases.
     *
     * Generated from protobuf field <code>string text = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getText()
    {
        return $this->text;
    }

    /**
     * Required. Text input which can be used for prompt or banned phrases.
     *
     * Generated from protobuf field <code>string text = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setText($var)
    {
        GPBUtil::checkString($var, True);
        $this->text = $var;

        return $this;
    }

    /**
     * Required. Language code of the phrase.
     *
     * Generated from protobuf field <code>string language_code = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getLanguageCode()
    {
        return $this->language_code;
    }

    /**
     * Required. Language code of the phrase.
     *
     * Generated from protobuf field <code>string language_code = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setLanguageCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->language_code = $var;

        return $this;
    }

}


