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

namespace Google\Cloud\AccessApproval\V1;

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

/**
 * A decision that has been made to dismiss an approval request.
 *
 * Generated from protobuf message <code>google.cloud.accessapproval.v1.DismissDecision</code>
 */
class DismissDecision extends \Google\Protobuf\Internal\Message
{
    /**
     * The time at which the approval request was dismissed.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp dismiss_time = 1;</code>
     */
    private $dismiss_time = null;
    /**
     * This field will be true if the ApprovalRequest was implicitly dismissed due
     * to inaction by the access approval approvers (the request is not acted
     * on by the approvers before the exiration time).
     *
     * Generated from protobuf field <code>bool implicit = 2;</code>
     */
    private $implicit = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\Timestamp $dismiss_time
     *           The time at which the approval request was dismissed.
     *     @type bool $implicit
     *           This field will be true if the ApprovalRequest was implicitly dismissed due
     *           to inaction by the access approval approvers (the request is not acted
     *           on by the approvers before the exiration time).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Accessapproval\V1\Accessapproval::initOnce();
        parent::__construct($data);
    }

    /**
     * The time at which the approval request was dismissed.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp dismiss_time = 1;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getDismissTime()
    {
        return $this->dismiss_time;
    }

    public function hasDismissTime()
    {
        return isset($this->dismiss_time);
    }

    public function clearDismissTime()
    {
        unset($this->dismiss_time);
    }

    /**
     * The time at which the approval request was dismissed.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp dismiss_time = 1;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setDismissTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->dismiss_time = $var;

        return $this;
    }

    /**
     * This field will be true if the ApprovalRequest was implicitly dismissed due
     * to inaction by the access approval approvers (the request is not acted
     * on by the approvers before the exiration time).
     *
     * Generated from protobuf field <code>bool implicit = 2;</code>
     * @return bool
     */
    public function getImplicit()
    {
        return $this->implicit;
    }

    /**
     * This field will be true if the ApprovalRequest was implicitly dismissed due
     * to inaction by the access approval approvers (the request is not acted
     * on by the approvers before the exiration time).
     *
     * Generated from protobuf field <code>bool implicit = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setImplicit($var)
    {
        GPBUtil::checkBool($var);
        $this->implicit = $var;

        return $this;
    }

}

