<?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 CreateRestorePlan.
 *
 * Generated from protobuf message <code>google.cloud.gkebackup.v1.CreateRestorePlanRequest</code>
 */
class CreateRestorePlanRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The location within which to create the RestorePlan.
     * Format: projects/&#42;&#47;locations/&#42;
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Required. The RestorePlan resource object to create.
     *
     * Generated from protobuf field <code>.google.cloud.gkebackup.v1.RestorePlan restore_plan = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $restore_plan = null;
    /**
     * Required. The client-provided short name for the RestorePlan 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 RestorePlans in this location
     *
     * Generated from protobuf field <code>string restore_plan_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $restore_plan_id = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The location within which to create the RestorePlan.
     *           Format: projects/&#42;&#47;locations/&#42;
     *     @type \Google\Cloud\GkeBackup\V1\RestorePlan $restore_plan
     *           Required. The RestorePlan resource object to create.
     *     @type string $restore_plan_id
     *           Required. The client-provided short name for the RestorePlan 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 RestorePlans in this location
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The location within which to create the RestorePlan.
     * Format: projects/&#42;&#47;locations/&#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 location within which to create the RestorePlan.
     * Format: projects/&#42;&#47;locations/&#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 RestorePlan resource object to create.
     *
     * Generated from protobuf field <code>.google.cloud.gkebackup.v1.RestorePlan restore_plan = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\GkeBackup\V1\RestorePlan|null
     */
    public function getRestorePlan()
    {
        return $this->restore_plan;
    }

    public function hasRestorePlan()
    {
        return isset($this->restore_plan);
    }

    public function clearRestorePlan()
    {
        unset($this->restore_plan);
    }

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

        return $this;
    }

    /**
     * Required. The client-provided short name for the RestorePlan 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 RestorePlans in this location
     *
     * Generated from protobuf field <code>string restore_plan_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getRestorePlanId()
    {
        return $this->restore_plan_id;
    }

    /**
     * Required. The client-provided short name for the RestorePlan 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 RestorePlans in this location
     *
     * Generated from protobuf field <code>string restore_plan_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setRestorePlanId($var)
    {
        GPBUtil::checkString($var, True);
        $this->restore_plan_id = $var;

        return $this;
    }

}

