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

namespace Google\Cloud\Memorystore\V1;

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

/**
 * Backup is consisted of multiple backup files.
 *
 * Generated from protobuf message <code>google.cloud.memorystore.v1.BackupFile</code>
 */
class BackupFile extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. e.g: <shard-id>.rdb
     *
     * Generated from protobuf field <code>string file_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $file_name = '';
    /**
     * Output only. Size of the backup file in bytes.
     *
     * Generated from protobuf field <code>int64 size_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $size_bytes = 0;
    /**
     * Output only. The time when the backup file was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $create_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $file_name
     *           Output only. e.g: <shard-id>.rdb
     *     @type int|string $size_bytes
     *           Output only. Size of the backup file in bytes.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. The time when the backup file was created.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. e.g: <shard-id>.rdb
     *
     * Generated from protobuf field <code>string file_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getFileName()
    {
        return $this->file_name;
    }

    /**
     * Output only. e.g: <shard-id>.rdb
     *
     * Generated from protobuf field <code>string file_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setFileName($var)
    {
        GPBUtil::checkString($var, True);
        $this->file_name = $var;

        return $this;
    }

    /**
     * Output only. Size of the backup file in bytes.
     *
     * Generated from protobuf field <code>int64 size_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int|string
     */
    public function getSizeBytes()
    {
        return $this->size_bytes;
    }

    /**
     * Output only. Size of the backup file in bytes.
     *
     * Generated from protobuf field <code>int64 size_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int|string $var
     * @return $this
     */
    public function setSizeBytes($var)
    {
        GPBUtil::checkInt64($var);
        $this->size_bytes = $var;

        return $this;
    }

    /**
     * Output only. The time when the backup file was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 3 [(.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. The time when the backup file was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 3 [(.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;
    }

}

