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

namespace Google\Cloud\Compute\V1;

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

/**
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.PacketMirroringForwardingRuleInfo</code>
 */
class PacketMirroringForwardingRuleInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * [Output Only] Unique identifier for the forwarding rule; defined by the server.
     *
     * Generated from protobuf field <code>optional string canonical_url = 512294820;</code>
     */
    private $canonical_url = null;
    /**
     * Resource URL to the forwarding rule representing the ILB configured as destination of the mirrored traffic.
     *
     * Generated from protobuf field <code>optional string url = 116079;</code>
     */
    private $url = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $canonical_url
     *           [Output Only] Unique identifier for the forwarding rule; defined by the server.
     *     @type string $url
     *           Resource URL to the forwarding rule representing the ILB configured as destination of the mirrored traffic.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * [Output Only] Unique identifier for the forwarding rule; defined by the server.
     *
     * Generated from protobuf field <code>optional string canonical_url = 512294820;</code>
     * @return string
     */
    public function getCanonicalUrl()
    {
        return isset($this->canonical_url) ? $this->canonical_url : '';
    }

    public function hasCanonicalUrl()
    {
        return isset($this->canonical_url);
    }

    public function clearCanonicalUrl()
    {
        unset($this->canonical_url);
    }

    /**
     * [Output Only] Unique identifier for the forwarding rule; defined by the server.
     *
     * Generated from protobuf field <code>optional string canonical_url = 512294820;</code>
     * @param string $var
     * @return $this
     */
    public function setCanonicalUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->canonical_url = $var;

        return $this;
    }

    /**
     * Resource URL to the forwarding rule representing the ILB configured as destination of the mirrored traffic.
     *
     * Generated from protobuf field <code>optional string url = 116079;</code>
     * @return string
     */
    public function getUrl()
    {
        return isset($this->url) ? $this->url : '';
    }

    public function hasUrl()
    {
        return isset($this->url);
    }

    public function clearUrl()
    {
        unset($this->url);
    }

    /**
     * Resource URL to the forwarding rule representing the ILB configured as destination of the mirrored traffic.
     *
     * Generated from protobuf field <code>optional string url = 116079;</code>
     * @param string $var
     * @return $this
     */
    public function setUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->url = $var;

        return $this;
    }

}

