<?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
{
    /**
     * Optional. 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 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $resource_name = '';
    /**
     * Optional. 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 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $attachment_upload_token = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $resource_name
     *           Optional. 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
     *           Optional. 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);
    }

    /**
     * Optional. 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 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getResourceName()
    {
        return $this->resource_name;
    }

    /**
     * Optional. 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 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setResourceName($var)
    {
        GPBUtil::checkString($var, True);
        $this->resource_name = $var;

        return $this;
    }

    /**
     * Optional. 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 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getAttachmentUploadToken()
    {
        return $this->attachment_upload_token;
    }

    /**
     * Optional. 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 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setAttachmentUploadToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->attachment_upload_token = $var;

        return $this;
    }

}

