<?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;

/**
 * Configs for the Rollback rollout.
 *
 * Generated from protobuf message <code>google.cloud.deploy.v1.RollbackTargetConfig</code>
 */
class RollbackTargetConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. The rollback `Rollout` to create.
     *
     * Generated from protobuf field <code>.google.cloud.deploy.v1.Rollout rollout = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $rollout = null;
    /**
     * Optional. The starting phase ID for the `Rollout`. If unspecified, the
     * `Rollout` will start in the stable phase.
     *
     * Generated from protobuf field <code>string starting_phase_id = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $starting_phase_id = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Deploy\V1\Rollout $rollout
     *           Optional. The rollback `Rollout` to create.
     *     @type string $starting_phase_id
     *           Optional. The starting phase ID for the `Rollout`. If unspecified, the
     *           `Rollout` will start in the stable phase.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Deploy\V1\CloudDeploy::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The rollback `Rollout` to create.
     *
     * Generated from protobuf field <code>.google.cloud.deploy.v1.Rollout rollout = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Deploy\V1\Rollout|null
     */
    public function getRollout()
    {
        return $this->rollout;
    }

    public function hasRollout()
    {
        return isset($this->rollout);
    }

    public function clearRollout()
    {
        unset($this->rollout);
    }

    /**
     * Optional. The rollback `Rollout` to create.
     *
     * Generated from protobuf field <code>.google.cloud.deploy.v1.Rollout rollout = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Deploy\V1\Rollout $var
     * @return $this
     */
    public function setRollout($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Deploy\V1\Rollout::class);
        $this->rollout = $var;

        return $this;
    }

    /**
     * Optional. The starting phase ID for the `Rollout`. If unspecified, the
     * `Rollout` will start in the stable phase.
     *
     * Generated from protobuf field <code>string starting_phase_id = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getStartingPhaseId()
    {
        return $this->starting_phase_id;
    }

    /**
     * Optional. The starting phase ID for the `Rollout`. If unspecified, the
     * `Rollout` will start in the stable phase.
     *
     * Generated from protobuf field <code>string starting_phase_id = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setStartingPhaseId($var)
    {
        GPBUtil::checkString($var, True);
        $this->starting_phase_id = $var;

        return $this;
    }

}

