<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/monitoring/v3/notification_service.proto

namespace Google\Cloud\Monitoring\V3;

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

/**
 * The `GetNotificationChannelVerificationCode` request.
 *
 * Generated from protobuf message <code>google.monitoring.v3.GetNotificationChannelVerificationCodeResponse</code>
 */
class GetNotificationChannelVerificationCodeResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The verification code, which may be used to verify other channels
     * that have an equivalent identity (i.e. other channels of the same
     * type with the same fingerprint such as other email channels with
     * the same email address or other sms channels with the same number).
     *
     * Generated from protobuf field <code>string code = 1;</code>
     */
    private $code = '';
    /**
     * The expiration time associated with the code that was returned. If
     * an expiration was provided in the request, this is the minimum of the
     * requested expiration in the request and the max permitted expiration.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp expire_time = 2;</code>
     */
    private $expire_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $code
     *           The verification code, which may be used to verify other channels
     *           that have an equivalent identity (i.e. other channels of the same
     *           type with the same fingerprint such as other email channels with
     *           the same email address or other sms channels with the same number).
     *     @type \Google\Protobuf\Timestamp $expire_time
     *           The expiration time associated with the code that was returned. If
     *           an expiration was provided in the request, this is the minimum of the
     *           requested expiration in the request and the max permitted expiration.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce();
        parent::__construct($data);
    }

    /**
     * The verification code, which may be used to verify other channels
     * that have an equivalent identity (i.e. other channels of the same
     * type with the same fingerprint such as other email channels with
     * the same email address or other sms channels with the same number).
     *
     * Generated from protobuf field <code>string code = 1;</code>
     * @return string
     */
    public function getCode()
    {
        return $this->code;
    }

    /**
     * The verification code, which may be used to verify other channels
     * that have an equivalent identity (i.e. other channels of the same
     * type with the same fingerprint such as other email channels with
     * the same email address or other sms channels with the same number).
     *
     * Generated from protobuf field <code>string code = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->code = $var;

        return $this;
    }

    /**
     * The expiration time associated with the code that was returned. If
     * an expiration was provided in the request, this is the minimum of the
     * requested expiration in the request and the max permitted expiration.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp expire_time = 2;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getExpireTime()
    {
        return $this->expire_time;
    }

    public function hasExpireTime()
    {
        return isset($this->expire_time);
    }

    public function clearExpireTime()
    {
        unset($this->expire_time);
    }

    /**
     * The expiration time associated with the code that was returned. If
     * an expiration was provided in the request, this is the minimum of the
     * requested expiration in the request and the max permitted expiration.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp expire_time = 2;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setExpireTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->expire_time = $var;

        return $this;
    }

}

