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

/**
 * PipelineReadyCondition contains information around the status of the
 * Pipeline.
 *
 * Generated from protobuf message <code>google.cloud.deploy.v1.PipelineReadyCondition</code>
 */
class PipelineReadyCondition extends \Google\Protobuf\Internal\Message
{
    /**
     * True if the Pipeline is in a valid state. Otherwise at least one condition
     * in `PipelineCondition` is in an invalid state. Iterate over those
     * conditions and see which condition(s) has status = false to find out what
     * is wrong with the Pipeline.
     *
     * Generated from protobuf field <code>bool status = 3;</code>
     */
    private $status = false;
    /**
     * Last time the condition was updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 4;</code>
     */
    private $update_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $status
     *           True if the Pipeline is in a valid state. Otherwise at least one condition
     *           in `PipelineCondition` is in an invalid state. Iterate over those
     *           conditions and see which condition(s) has status = false to find out what
     *           is wrong with the Pipeline.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Last time the condition was updated.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Deploy\V1\CloudDeploy::initOnce();
        parent::__construct($data);
    }

    /**
     * True if the Pipeline is in a valid state. Otherwise at least one condition
     * in `PipelineCondition` is in an invalid state. Iterate over those
     * conditions and see which condition(s) has status = false to find out what
     * is wrong with the Pipeline.
     *
     * Generated from protobuf field <code>bool status = 3;</code>
     * @return bool
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * True if the Pipeline is in a valid state. Otherwise at least one condition
     * in `PipelineCondition` is in an invalid state. Iterate over those
     * conditions and see which condition(s) has status = false to find out what
     * is wrong with the Pipeline.
     *
     * Generated from protobuf field <code>bool status = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkBool($var);
        $this->status = $var;

        return $this;
    }

    /**
     * Last time the condition was updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 4;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Last time the condition was updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 4;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

}

