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

namespace Google\Cloud\Deploy\V1;

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

/**
 * SerialPipeline defines a sequential set of stages for a `DeliveryPipeline`.
 *
 * Generated from protobuf message <code>google.cloud.deploy.v1.SerialPipeline</code>
 */
class SerialPipeline extends \Google\Protobuf\Internal\Message
{
    /**
     * Each stage specifies configuration for a `Target`. The ordering
     * of this list defines the promotion flow.
     *
     * Generated from protobuf field <code>repeated .google.cloud.deploy.v1.Stage stages = 1;</code>
     */
    private $stages;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Deploy\V1\Stage>|\Google\Protobuf\Internal\RepeatedField $stages
     *           Each stage specifies configuration for a `Target`. The ordering
     *           of this list defines the promotion flow.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Deploy\V1\CloudDeploy::initOnce();
        parent::__construct($data);
    }

    /**
     * Each stage specifies configuration for a `Target`. The ordering
     * of this list defines the promotion flow.
     *
     * Generated from protobuf field <code>repeated .google.cloud.deploy.v1.Stage stages = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getStages()
    {
        return $this->stages;
    }

    /**
     * Each stage specifies configuration for a `Target`. The ordering
     * of this list defines the promotion flow.
     *
     * Generated from protobuf field <code>repeated .google.cloud.deploy.v1.Stage stages = 1;</code>
     * @param array<\Google\Cloud\Deploy\V1\Stage>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setStages($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Deploy\V1\Stage::class);
        $this->stages = $arr;

        return $this;
    }

}

