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

namespace Google\Apps\Chat\V1;

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

/**
 * Provides a snapshot of the content of the quoted message at the time of
 * quoting or forwarding
 *
 * Generated from protobuf message <code>google.chat.v1.QuotedMessageSnapshot</code>
 */
class QuotedMessageSnapshot extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The quoted message's author name.
     * Populated for both REPLY & FORWARD quote types.
     *
     * Generated from protobuf field <code>string sender = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $sender = '';
    /**
     * Output only. Snapshot of the quoted message's text content.
     *
     * Generated from protobuf field <code>string text = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $text = '';
    /**
     * Output only. Contains the quoted message `text` with markups added to
     * support rich formatting like hyperlinks,custom emojis, markup, etc.
     * Populated only for FORWARD quote type.
     *
     * Generated from protobuf field <code>string formatted_text = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $formatted_text = '';
    /**
     * Output only. Annotations parsed from the text body of the quoted message.
     * Populated only for FORWARD quote type.
     *
     * Generated from protobuf field <code>repeated .google.chat.v1.Annotation annotations = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $annotations;
    /**
     * Output only. Attachments that were part of the quoted message. These are
     * copies of the quoted message's attachment metadata. Populated only for
     * FORWARD quote type.
     *
     * Generated from protobuf field <code>repeated .google.chat.v1.Attachment attachments = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $attachments;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $sender
     *           Output only. The quoted message's author name.
     *           Populated for both REPLY & FORWARD quote types.
     *     @type string $text
     *           Output only. Snapshot of the quoted message's text content.
     *     @type string $formatted_text
     *           Output only. Contains the quoted message `text` with markups added to
     *           support rich formatting like hyperlinks,custom emojis, markup, etc.
     *           Populated only for FORWARD quote type.
     *     @type \Google\Apps\Chat\V1\Annotation[] $annotations
     *           Output only. Annotations parsed from the text body of the quoted message.
     *           Populated only for FORWARD quote type.
     *     @type \Google\Apps\Chat\V1\Attachment[] $attachments
     *           Output only. Attachments that were part of the quoted message. These are
     *           copies of the quoted message's attachment metadata. Populated only for
     *           FORWARD quote type.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Chat\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The quoted message's author name.
     * Populated for both REPLY & FORWARD quote types.
     *
     * Generated from protobuf field <code>string sender = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getSender()
    {
        return $this->sender;
    }

    /**
     * Output only. The quoted message's author name.
     * Populated for both REPLY & FORWARD quote types.
     *
     * Generated from protobuf field <code>string sender = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setSender($var)
    {
        GPBUtil::checkString($var, True);
        $this->sender = $var;

        return $this;
    }

    /**
     * Output only. Snapshot of the quoted message's text content.
     *
     * Generated from protobuf field <code>string text = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getText()
    {
        return $this->text;
    }

    /**
     * Output only. Snapshot of the quoted message's text content.
     *
     * Generated from protobuf field <code>string text = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setText($var)
    {
        GPBUtil::checkString($var, True);
        $this->text = $var;

        return $this;
    }

    /**
     * Output only. Contains the quoted message `text` with markups added to
     * support rich formatting like hyperlinks,custom emojis, markup, etc.
     * Populated only for FORWARD quote type.
     *
     * Generated from protobuf field <code>string formatted_text = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getFormattedText()
    {
        return $this->formatted_text;
    }

    /**
     * Output only. Contains the quoted message `text` with markups added to
     * support rich formatting like hyperlinks,custom emojis, markup, etc.
     * Populated only for FORWARD quote type.
     *
     * Generated from protobuf field <code>string formatted_text = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setFormattedText($var)
    {
        GPBUtil::checkString($var, True);
        $this->formatted_text = $var;

        return $this;
    }

    /**
     * Output only. Annotations parsed from the text body of the quoted message.
     * Populated only for FORWARD quote type.
     *
     * Generated from protobuf field <code>repeated .google.chat.v1.Annotation annotations = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return RepeatedField<\Google\Apps\Chat\V1\Annotation>
     */
    public function getAnnotations()
    {
        return $this->annotations;
    }

    /**
     * Output only. Annotations parsed from the text body of the quoted message.
     * Populated only for FORWARD quote type.
     *
     * Generated from protobuf field <code>repeated .google.chat.v1.Annotation annotations = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Apps\Chat\V1\Annotation[] $var
     * @return $this
     */
    public function setAnnotations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Annotation::class);
        $this->annotations = $arr;

        return $this;
    }

    /**
     * Output only. Attachments that were part of the quoted message. These are
     * copies of the quoted message's attachment metadata. Populated only for
     * FORWARD quote type.
     *
     * Generated from protobuf field <code>repeated .google.chat.v1.Attachment attachments = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return RepeatedField<\Google\Apps\Chat\V1\Attachment>
     */
    public function getAttachments()
    {
        return $this->attachments;
    }

    /**
     * Output only. Attachments that were part of the quoted message. These are
     * copies of the quoted message's attachment metadata. Populated only for
     * FORWARD quote type.
     *
     * Generated from protobuf field <code>repeated .google.chat.v1.Attachment attachments = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Apps\Chat\V1\Attachment[] $var
     * @return $this
     */
    public function setAttachments($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Attachment::class);
        $this->attachments = $arr;

        return $this;
    }

}

