<?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 CreateBackupPlan.
 *
 * Generated from protobuf message <code>google.cloud.gkebackup.v1.CreateBackupPlanRequest</code>
 */
class CreateBackupPlanRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The location within which to create the BackupPlan.
     * 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 BackupPlan resource object to create.
     *
     * Generated from protobuf field <code>.google.cloud.gkebackup.v1.BackupPlan backup_plan = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $backup_plan = null;
    /**
     * Required. The client-provided short name for the BackupPlan 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 BackupPlans in this location
     *
     * Generated from protobuf field <code>string backup_plan_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $backup_plan_id = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The location within which to create the BackupPlan.
     *           Format: projects/&#42;&#47;locations/&#42;
     *     @type \Google\Cloud\GkeBackup\V1\BackupPlan $backup_plan
     *           Required. The BackupPlan resource object to create.
     *     @type string $backup_plan_id
     *           Required. The client-provided short name for the BackupPlan 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 BackupPlans 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 BackupPlan.
     * 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 BackupPlan.
     * 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 BackupPlan resource object to create.
     *
     * Generated from protobuf field <code>.google.cloud.gkebackup.v1.BackupPlan backup_plan = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\GkeBackup\V1\BackupPlan|null
     */
    public function getBackupPlan()
    {
        return $this->backup_plan;
    }

    public function hasBackupPlan()
    {
        return isset($this->backup_plan);
    }

    public function clearBackupPlan()
    {
        unset($this->backup_plan);
    }

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

        return $this;
    }

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

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

        return $this;
    }

}

