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

namespace Google\Cloud\GkeBackup\V1;

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

/**
 * Request message for CreateRestore.
 *
 * Generated from protobuf message <code>google.cloud.gkebackup.v1.CreateRestoreRequest</code>
 */
class CreateRestoreRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The RestorePlan within which to create the Restore.
     * Format: projects/&#42;&#47;locations/&#42;&#47;restorePlans/&#42;
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Required. The restore resource to create.
     *
     * Generated from protobuf field <code>.google.cloud.gkebackup.v1.Restore restore = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $restore = null;
    /**
     * Required. The client-provided short name for the Restore resource.
     * This name must:
     *  - be between 1 and 63 characters long (inclusive)
     *  - consist of only lower-case ASCII letters, numbers, and dashes
     *  - start with a lower-case letter
     *  - end with a lower-case letter or number
     *  - be unique within the set of Restores in this RestorePlan.
     *
     * Generated from protobuf field <code>string restore_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $restore_id = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The RestorePlan within which to create the Restore.
     *           Format: projects/&#42;&#47;locations/&#42;&#47;restorePlans/&#42;
     *     @type \Google\Cloud\GkeBackup\V1\Restore $restore
     *           Required. The restore resource to create.
     *     @type string $restore_id
     *           Required. The client-provided short name for the Restore resource.
     *           This name must:
     *            - be between 1 and 63 characters long (inclusive)
     *            - consist of only lower-case ASCII letters, numbers, and dashes
     *            - start with a lower-case letter
     *            - end with a lower-case letter or number
     *            - be unique within the set of Restores in this RestorePlan.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The RestorePlan within which to create the Restore.
     * Format: projects/&#42;&#47;locations/&#42;&#47;restorePlans/&#42;
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The RestorePlan within which to create the Restore.
     * Format: projects/&#42;&#47;locations/&#42;&#47;restorePlans/&#42;
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. The restore resource to create.
     *
     * Generated from protobuf field <code>.google.cloud.gkebackup.v1.Restore restore = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\GkeBackup\V1\Restore|null
     */
    public function getRestore()
    {
        return $this->restore;
    }

    public function hasRestore()
    {
        return isset($this->restore);
    }

    public function clearRestore()
    {
        unset($this->restore);
    }

    /**
     * Required. The restore resource to create.
     *
     * Generated from protobuf field <code>.google.cloud.gkebackup.v1.Restore restore = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\GkeBackup\V1\Restore $var
     * @return $this
     */
    public function setRestore($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\Restore::class);
        $this->restore = $var;

        return $this;
    }

    /**
     * Required. The client-provided short name for the Restore resource.
     * This name must:
     *  - be between 1 and 63 characters long (inclusive)
     *  - consist of only lower-case ASCII letters, numbers, and dashes
     *  - start with a lower-case letter
     *  - end with a lower-case letter or number
     *  - be unique within the set of Restores in this RestorePlan.
     *
     * Generated from protobuf field <code>string restore_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getRestoreId()
    {
        return $this->restore_id;
    }

    /**
     * Required. The client-provided short name for the Restore resource.
     * This name must:
     *  - be between 1 and 63 characters long (inclusive)
     *  - consist of only lower-case ASCII letters, numbers, and dashes
     *  - start with a lower-case letter
     *  - end with a lower-case letter or number
     *  - be unique within the set of Restores in this RestorePlan.
     *
     * Generated from protobuf field <code>string restore_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setRestoreId($var)
    {
        GPBUtil::checkString($var, True);
        $this->restore_id = $var;

        return $this;
    }

}

