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

namespace Google\Cloud\NetworkManagement\V1;

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

/**
 * Details of the final state "abort" and associated resource.
 *
 * Generated from protobuf message <code>google.cloud.networkmanagement.v1.AbortInfo</code>
 */
class AbortInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Causes that the analysis is aborted.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1;</code>
     */
    private $cause = 0;
    /**
     * URI of the resource that caused the abort.
     *
     * Generated from protobuf field <code>string resource_uri = 2;</code>
     */
    private $resource_uri = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $cause
     *           Causes that the analysis is aborted.
     *     @type string $resource_uri
     *           URI of the resource that caused the abort.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce();
        parent::__construct($data);
    }

    /**
     * Causes that the analysis is aborted.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1;</code>
     * @return int
     */
    public function getCause()
    {
        return $this->cause;
    }

    /**
     * Causes that the analysis is aborted.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setCause($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\AbortInfo\Cause::class);
        $this->cause = $var;

        return $this;
    }

    /**
     * URI of the resource that caused the abort.
     *
     * Generated from protobuf field <code>string resource_uri = 2;</code>
     * @return string
     */
    public function getResourceUri()
    {
        return $this->resource_uri;
    }

    /**
     * URI of the resource that caused the abort.
     *
     * Generated from protobuf field <code>string resource_uri = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setResourceUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->resource_uri = $var;

        return $this;
    }

}

