<?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 = '';
    /**
     * IP address that caused the abort.
     *
     * Generated from protobuf field <code>string ip_address = 4 [(.google.api.field_info) = {</code>
     */
    private $ip_address = '';
    /**
     * List of project IDs the user specified in the request but lacks access to.
     * In this case, analysis is aborted with the PERMISSION_DENIED cause.
     *
     * Generated from protobuf field <code>repeated string projects_missing_permission = 3;</code>
     */
    private $projects_missing_permission;

    /**
     * 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.
     *     @type string $ip_address
     *           IP address that caused the abort.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $projects_missing_permission
     *           List of project IDs the user specified in the request but lacks access to.
     *           In this case, analysis is aborted with the PERMISSION_DENIED cause.
     * }
     */
    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;
    }

    /**
     * IP address that caused the abort.
     *
     * Generated from protobuf field <code>string ip_address = 4 [(.google.api.field_info) = {</code>
     * @return string
     */
    public function getIpAddress()
    {
        return $this->ip_address;
    }

    /**
     * IP address that caused the abort.
     *
     * Generated from protobuf field <code>string ip_address = 4 [(.google.api.field_info) = {</code>
     * @param string $var
     * @return $this
     */
    public function setIpAddress($var)
    {
        GPBUtil::checkString($var, True);
        $this->ip_address = $var;

        return $this;
    }

    /**
     * List of project IDs the user specified in the request but lacks access to.
     * In this case, analysis is aborted with the PERMISSION_DENIED cause.
     *
     * Generated from protobuf field <code>repeated string projects_missing_permission = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getProjectsMissingPermission()
    {
        return $this->projects_missing_permission;
    }

    /**
     * List of project IDs the user specified in the request but lacks access to.
     * In this case, analysis is aborted with the PERMISSION_DENIED cause.
     *
     * Generated from protobuf field <code>repeated string projects_missing_permission = 3;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setProjectsMissingPermission($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->projects_missing_permission = $arr;

        return $this;
    }

}

