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

namespace Google\Cloud\BigQuery\Reservation\V1;

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

/**
 * The request for [ReservationService.MergeCapacityCommitments][google.cloud.bigquery.reservation.v1.ReservationService.MergeCapacityCommitments].
 *
 * Generated from protobuf message <code>google.cloud.bigquery.reservation.v1.MergeCapacityCommitmentsRequest</code>
 */
class MergeCapacityCommitmentsRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Parent resource that identifies admin project and location e.g.,
     *  `projects/myproject/locations/us`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Ids of capacity commitments to merge.
     * These capacity commitments must exist under admin project and location
     * specified in the parent.
     * ID is the last portion of capacity commitment name e.g., 'abc' for
     * projects/myproject/locations/US/capacityCommitments/abc
     *
     * Generated from protobuf field <code>repeated string capacity_commitment_ids = 2;</code>
     */
    private $capacity_commitment_ids;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Parent resource that identifies admin project and location e.g.,
     *            `projects/myproject/locations/us`
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $capacity_commitment_ids
     *           Ids of capacity commitments to merge.
     *           These capacity commitments must exist under admin project and location
     *           specified in the parent.
     *           ID is the last portion of capacity commitment name e.g., 'abc' for
     *           projects/myproject/locations/US/capacityCommitments/abc
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce();
        parent::__construct($data);
    }

    /**
     * Parent resource that identifies admin project and location e.g.,
     *  `projects/myproject/locations/us`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Parent resource that identifies admin project and location e.g.,
     *  `projects/myproject/locations/us`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Ids of capacity commitments to merge.
     * These capacity commitments must exist under admin project and location
     * specified in the parent.
     * ID is the last portion of capacity commitment name e.g., 'abc' for
     * projects/myproject/locations/US/capacityCommitments/abc
     *
     * Generated from protobuf field <code>repeated string capacity_commitment_ids = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCapacityCommitmentIds()
    {
        return $this->capacity_commitment_ids;
    }

    /**
     * Ids of capacity commitments to merge.
     * These capacity commitments must exist under admin project and location
     * specified in the parent.
     * ID is the last portion of capacity commitment name e.g., 'abc' for
     * projects/myproject/locations/US/capacityCommitments/abc
     *
     * Generated from protobuf field <code>repeated string capacity_commitment_ids = 2;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setCapacityCommitmentIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->capacity_commitment_ids = $arr;

        return $this;
    }

}

