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

namespace Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute;

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

/**
 * Informational warning message.
 *
 * Generated from protobuf message <code>google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings</code>
 */
class Warnings extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. A warning code, if applicable.
     *
     * Generated from protobuf field <code>.google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $code = 0;
    /**
     * Output only. Metadata about this warning in key: value format. The key should provides
     * more detail on the warning being returned. For example, for warnings
     * where there are no results in a list request for a particular zone, this
     * key might be scope and the key value might be the zone name. Other
     * examples might be a key indicating a deprecated resource and a suggested
     * replacement.
     *
     * Generated from protobuf field <code>map<string, string> data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $data;
    /**
     * Output only. A human-readable description of the warning code.
     *
     * Generated from protobuf field <code>string warning_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $warning_message = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $code
     *           Output only. A warning code, if applicable.
     *     @type array|\Google\Protobuf\Internal\MapField $data
     *           Output only. Metadata about this warning in key: value format. The key should provides
     *           more detail on the warning being returned. For example, for warnings
     *           where there are no results in a list request for a particular zone, this
     *           key might be scope and the key value might be the zone name. Other
     *           examples might be a key indicating a deprecated resource and a suggested
     *           replacement.
     *     @type string $warning_message
     *           Output only. A human-readable description of the warning code.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Networkconnectivity\V1\PolicyBasedRouting::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. A warning code, if applicable.
     *
     * Generated from protobuf field <code>.google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getCode()
    {
        return $this->code;
    }

    /**
     * Output only. A warning code, if applicable.
     *
     * Generated from protobuf field <code>.google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setCode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Warnings\Code::class);
        $this->code = $var;

        return $this;
    }

    /**
     * Output only. Metadata about this warning in key: value format. The key should provides
     * more detail on the warning being returned. For example, for warnings
     * where there are no results in a list request for a particular zone, this
     * key might be scope and the key value might be the zone name. Other
     * examples might be a key indicating a deprecated resource and a suggested
     * replacement.
     *
     * Generated from protobuf field <code>map<string, string> data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getData()
    {
        return $this->data;
    }

    /**
     * Output only. Metadata about this warning in key: value format. The key should provides
     * more detail on the warning being returned. For example, for warnings
     * where there are no results in a list request for a particular zone, this
     * key might be scope and the key value might be the zone name. Other
     * examples might be a key indicating a deprecated resource and a suggested
     * replacement.
     *
     * Generated from protobuf field <code>map<string, string> data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setData($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->data = $arr;

        return $this;
    }

    /**
     * Output only. A human-readable description of the warning code.
     *
     * Generated from protobuf field <code>string warning_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getWarningMessage()
    {
        return $this->warning_message;
    }

    /**
     * Output only. A human-readable description of the warning code.
     *
     * Generated from protobuf field <code>string warning_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setWarningMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->warning_message = $var;

        return $this;
    }

}


