<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: site/api_file_upload.proto

namespace Zaly\Proto\Site;

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

/**
 **
 * action: api.file.upload
 * error:
 *.    error.file.large     the file is larger than the limit the server allowed.
 *.    error.file.wrong     the file doesnot match the filetype in request.
 *
 * Generated from protobuf message <code>site.ApiFileUploadRequest</code>
 */
class ApiFileUploadRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>bytes file = 1;</code>
     */
    private $file = '';
    /**
     * Generated from protobuf field <code>.core.FileType fileType = 2;</code>
     */
    private $fileType = 0;
    /**
     * Generated from protobuf field <code>bool isMessageAttachment = 3;</code>
     */
    private $isMessageAttachment = false;

    public function __construct() {
        \GPBMetadata\Site\ApiFileUpload::initOnce();
        parent::__construct();
    }

    /**
     * Generated from protobuf field <code>bytes file = 1;</code>
     * @return string
     */
    public function getFile()
    {
        return $this->file;
    }

    /**
     * Generated from protobuf field <code>bytes file = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setFile($var)
    {
        GPBUtil::checkString($var, False);
        $this->file = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.core.FileType fileType = 2;</code>
     * @return int
     */
    public function getFileType()
    {
        return $this->fileType;
    }

    /**
     * Generated from protobuf field <code>.core.FileType fileType = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setFileType($var)
    {
        GPBUtil::checkEnum($var, \Zaly\Proto\Core\FileType::class);
        $this->fileType = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool isMessageAttachment = 3;</code>
     * @return bool
     */
    public function getIsMessageAttachment()
    {
        return $this->isMessageAttachment;
    }

    /**
     * Generated from protobuf field <code>bool isMessageAttachment = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsMessageAttachment($var)
    {
        GPBUtil::checkBool($var);
        $this->isMessageAttachment = $var;

        return $this;
    }

}

