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

namespace Google\Cloud\Kms\Inventory\V1;

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

/**
 * A warning message that indicates potential problems with the response data.
 *
 * Generated from protobuf message <code>google.cloud.kms.inventory.v1.Warning</code>
 */
class Warning extends \Google\Protobuf\Internal\Message
{
    /**
     * The specific warning code for the displayed message.
     *
     * Generated from protobuf field <code>.google.cloud.kms.inventory.v1.Warning.WarningCode warning_code = 1;</code>
     */
    protected $warning_code = 0;
    /**
     * The literal message providing context and details about the warnings.
     *
     * Generated from protobuf field <code>string display_message = 2;</code>
     */
    protected $display_message = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $warning_code
     *           The specific warning code for the displayed message.
     *     @type string $display_message
     *           The literal message providing context and details about the warnings.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Kms\Inventory\V1\KeyTrackingService::initOnce();
        parent::__construct($data);
    }

    /**
     * The specific warning code for the displayed message.
     *
     * Generated from protobuf field <code>.google.cloud.kms.inventory.v1.Warning.WarningCode warning_code = 1;</code>
     * @return int
     */
    public function getWarningCode()
    {
        return $this->warning_code;
    }

    /**
     * The specific warning code for the displayed message.
     *
     * Generated from protobuf field <code>.google.cloud.kms.inventory.v1.Warning.WarningCode warning_code = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setWarningCode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Kms\Inventory\V1\Warning\WarningCode::class);
        $this->warning_code = $var;

        return $this;
    }

    /**
     * The literal message providing context and details about the warnings.
     *
     * Generated from protobuf field <code>string display_message = 2;</code>
     * @return string
     */
    public function getDisplayMessage()
    {
        return $this->display_message;
    }

    /**
     * The literal message providing context and details about the warnings.
     *
     * Generated from protobuf field <code>string display_message = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_message = $var;

        return $this;
    }

}

