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

namespace Google\Apps\Chat\V1;

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

/**
 * A reference to the attachment data.
 *
 * Generated from protobuf message <code>google.chat.v1.AttachmentDataRef</code>
 */
class AttachmentDataRef extends \Google\Protobuf\Internal\Message
{
    /**
     * The resource name of the attachment data. This field is used with the media
     * API to download the attachment data.
     *
     * Generated from protobuf field <code>string resource_name = 1;</code>
     */
    protected $resource_name = '';
    /**
     * Opaque token containing a reference to an uploaded attachment. Treated by
     * clients as an opaque string and used to create or update Chat messages with
     * attachments.
     *
     * Generated from protobuf field <code>string attachment_upload_token = 2;</code>
     */
    protected $attachment_upload_token = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $resource_name
     *           The resource name of the attachment data. This field is used with the media
     *           API to download the attachment data.
     *     @type string $attachment_upload_token
     *           Opaque token containing a reference to an uploaded attachment. Treated by
     *           clients as an opaque string and used to create or update Chat messages with
     *           attachments.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Chat\V1\Attachment::initOnce();
        parent::__construct($data);
    }

    /**
     * The resource name of the attachment data. This field is used with the media
     * API to download the attachment data.
     *
     * Generated from protobuf field <code>string resource_name = 1;</code>
     * @return string
     */
    public function getResourceName()
    {
        return $this->resource_name;
    }

    /**
     * The resource name of the attachment data. This field is used with the media
     * API to download the attachment data.
     *
     * Generated from protobuf field <code>string resource_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setResourceName($var)
    {
        GPBUtil::checkString($var, True);
        $this->resource_name = $var;

        return $this;
    }

    /**
     * Opaque token containing a reference to an uploaded attachment. Treated by
     * clients as an opaque string and used to create or update Chat messages with
     * attachments.
     *
     * Generated from protobuf field <code>string attachment_upload_token = 2;</code>
     * @return string
     */
    public function getAttachmentUploadToken()
    {
        return $this->attachment_upload_token;
    }

    /**
     * Opaque token containing a reference to an uploaded attachment. Treated by
     * clients as an opaque string and used to create or update Chat messages with
     * attachments.
     *
     * Generated from protobuf field <code>string attachment_upload_token = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setAttachmentUploadToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->attachment_upload_token = $var;

        return $this;
    }

}

