<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/contactcenterinsights/v1/resources.proto

namespace Google\Cloud\ContactCenterInsights\V1;

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

/**
 * Represents a conversation, resource, and label provided by the user.
 *
 * Generated from protobuf message <code>google.cloud.contactcenterinsights.v1.FeedbackLabel</code>
 */
class FeedbackLabel extends \Google\Protobuf\Internal\Message
{
    /**
     * Immutable. Resource name of the FeedbackLabel.
     * Format:
     * projects/{project}/locations/{location}/conversations/{conversation}/feedbackLabels/{feedback_label}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $name = '';
    /**
     * Resource name of the resource to be labeled.
     *
     * Generated from protobuf field <code>string labeled_resource = 3;</code>
     */
    protected $labeled_resource = '';
    /**
     * Output only. Create time of the label.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $create_time = null;
    /**
     * Output only. Update time of the label.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $update_time = null;
    protected $label_type;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $label
     *           String label.
     *     @type \Google\Cloud\ContactCenterInsights\V1\QaAnswer\AnswerValue $qa_answer_label
     *           QaAnswer label.
     *     @type string $name
     *           Immutable. Resource name of the FeedbackLabel.
     *           Format:
     *           projects/{project}/locations/{location}/conversations/{conversation}/feedbackLabels/{feedback_label}
     *     @type string $labeled_resource
     *           Resource name of the resource to be labeled.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. Create time of the label.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. Update time of the label.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * String label.
     *
     * Generated from protobuf field <code>string label = 4;</code>
     * @return string
     */
    public function getLabel()
    {
        return $this->readOneof(4);
    }

    public function hasLabel()
    {
        return $this->hasOneof(4);
    }

    /**
     * String label.
     *
     * Generated from protobuf field <code>string label = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setLabel($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * QaAnswer label.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue qa_answer_label = 7;</code>
     * @return \Google\Cloud\ContactCenterInsights\V1\QaAnswer\AnswerValue|null
     */
    public function getQaAnswerLabel()
    {
        return $this->readOneof(7);
    }

    public function hasQaAnswerLabel()
    {
        return $this->hasOneof(7);
    }

    /**
     * QaAnswer label.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue qa_answer_label = 7;</code>
     * @param \Google\Cloud\ContactCenterInsights\V1\QaAnswer\AnswerValue $var
     * @return $this
     */
    public function setQaAnswerLabel($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\QaAnswer\AnswerValue::class);
        $this->writeOneof(7, $var);

        return $this;
    }

    /**
     * Immutable. Resource name of the FeedbackLabel.
     * Format:
     * projects/{project}/locations/{location}/conversations/{conversation}/feedbackLabels/{feedback_label}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Immutable. Resource name of the FeedbackLabel.
     * Format:
     * projects/{project}/locations/{location}/conversations/{conversation}/feedbackLabels/{feedback_label}
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Resource name of the resource to be labeled.
     *
     * Generated from protobuf field <code>string labeled_resource = 3;</code>
     * @return string
     */
    public function getLabeledResource()
    {
        return $this->labeled_resource;
    }

    /**
     * Resource name of the resource to be labeled.
     *
     * Generated from protobuf field <code>string labeled_resource = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setLabeledResource($var)
    {
        GPBUtil::checkString($var, True);
        $this->labeled_resource = $var;

        return $this;
    }

    /**
     * Output only. Create time of the label.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    public function hasCreateTime()
    {
        return isset($this->create_time);
    }

    public function clearCreateTime()
    {
        unset($this->create_time);
    }

    /**
     * Output only. Create time of the label.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Output only. Update time of the label.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Output only. Update time of the label.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getLabelType()
    {
        return $this->whichOneof("label_type");
    }

}

