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

namespace Google\Cloud\Sql\V1beta4;

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

/**
 * Database instance restore from backup context.
 * Backup context contains source instance id and project id.
 *
 * Generated from protobuf message <code>google.cloud.sql.v1beta4.RestoreBackupContext</code>
 */
class RestoreBackupContext extends \Google\Protobuf\Internal\Message
{
    /**
     * This is always `sql#restoreBackupContext`.
     *
     * Generated from protobuf field <code>string kind = 1;</code>
     */
    private $kind = '';
    /**
     * The ID of the backup run to restore from.
     *
     * Generated from protobuf field <code>int64 backup_run_id = 2;</code>
     */
    private $backup_run_id = 0;
    /**
     * The ID of the instance that the backup was taken from.
     *
     * Generated from protobuf field <code>string instance_id = 3;</code>
     */
    private $instance_id = '';
    /**
     * The full project ID of the source instance.
     *
     * Generated from protobuf field <code>string project = 4;</code>
     */
    private $project = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $kind
     *           This is always `sql#restoreBackupContext`.
     *     @type int|string $backup_run_id
     *           The ID of the backup run to restore from.
     *     @type string $instance_id
     *           The ID of the instance that the backup was taken from.
     *     @type string $project
     *           The full project ID of the source instance.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce();
        parent::__construct($data);
    }

    /**
     * This is always `sql#restoreBackupContext`.
     *
     * Generated from protobuf field <code>string kind = 1;</code>
     * @return string
     */
    public function getKind()
    {
        return $this->kind;
    }

    /**
     * This is always `sql#restoreBackupContext`.
     *
     * Generated from protobuf field <code>string kind = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setKind($var)
    {
        GPBUtil::checkString($var, True);
        $this->kind = $var;

        return $this;
    }

    /**
     * The ID of the backup run to restore from.
     *
     * Generated from protobuf field <code>int64 backup_run_id = 2;</code>
     * @return int|string
     */
    public function getBackupRunId()
    {
        return $this->backup_run_id;
    }

    /**
     * The ID of the backup run to restore from.
     *
     * Generated from protobuf field <code>int64 backup_run_id = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setBackupRunId($var)
    {
        GPBUtil::checkInt64($var);
        $this->backup_run_id = $var;

        return $this;
    }

    /**
     * The ID of the instance that the backup was taken from.
     *
     * Generated from protobuf field <code>string instance_id = 3;</code>
     * @return string
     */
    public function getInstanceId()
    {
        return $this->instance_id;
    }

    /**
     * The ID of the instance that the backup was taken from.
     *
     * Generated from protobuf field <code>string instance_id = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setInstanceId($var)
    {
        GPBUtil::checkString($var, True);
        $this->instance_id = $var;

        return $this;
    }

    /**
     * The full project ID of the source instance.
     *
     * Generated from protobuf field <code>string project = 4;</code>
     * @return string
     */
    public function getProject()
    {
        return $this->project;
    }

    /**
     * The full project ID of the source instance.
     *
     * Generated from protobuf field <code>string project = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setProject($var)
    {
        GPBUtil::checkString($var, True);
        $this->project = $var;

        return $this;
    }

}

