<?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;

/**
 * For display only. Metadata associated with a VPC firewall rule, an implied
 * VPC firewall rule, or a hierarchical firewall policy rule.
 *
 * Generated from protobuf message <code>google.cloud.networkmanagement.v1.FirewallInfo</code>
 */
class FirewallInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * The display name of the VPC firewall rule. This field is not applicable
     * to hierarchical firewall policy rules.
     *
     * Generated from protobuf field <code>string display_name = 1;</code>
     */
    private $display_name = '';
    /**
     * The URI of the VPC firewall rule. This field is not applicable to
     * implied firewall rules or hierarchical firewall policy rules.
     *
     * Generated from protobuf field <code>string uri = 2;</code>
     */
    private $uri = '';
    /**
     * Possible values: INGRESS, EGRESS
     *
     * Generated from protobuf field <code>string direction = 3;</code>
     */
    private $direction = '';
    /**
     * Possible values: ALLOW, DENY
     *
     * Generated from protobuf field <code>string action = 4;</code>
     */
    private $action = '';
    /**
     * The priority of the firewall rule.
     *
     * Generated from protobuf field <code>int32 priority = 5;</code>
     */
    private $priority = 0;
    /**
     * The URI of the VPC network that the firewall rule is associated with.
     * This field is not applicable to hierarchical firewall policy rules.
     *
     * Generated from protobuf field <code>string network_uri = 6;</code>
     */
    private $network_uri = '';
    /**
     * The target tags defined by the VPC firewall rule. This field is not
     * applicable to hierarchical firewall policy rules.
     *
     * Generated from protobuf field <code>repeated string target_tags = 7;</code>
     */
    private $target_tags;
    /**
     * The target service accounts specified by the firewall rule.
     *
     * Generated from protobuf field <code>repeated string target_service_accounts = 8;</code>
     */
    private $target_service_accounts;
    /**
     * The hierarchical firewall policy that this rule is associated with.
     * This field is not applicable to VPC firewall rules.
     *
     * Generated from protobuf field <code>string policy = 9;</code>
     */
    private $policy = '';
    /**
     * The firewall rule's type.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10;</code>
     */
    private $firewall_rule_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $display_name
     *           The display name of the VPC firewall rule. This field is not applicable
     *           to hierarchical firewall policy rules.
     *     @type string $uri
     *           The URI of the VPC firewall rule. This field is not applicable to
     *           implied firewall rules or hierarchical firewall policy rules.
     *     @type string $direction
     *           Possible values: INGRESS, EGRESS
     *     @type string $action
     *           Possible values: ALLOW, DENY
     *     @type int $priority
     *           The priority of the firewall rule.
     *     @type string $network_uri
     *           The URI of the VPC network that the firewall rule is associated with.
     *           This field is not applicable to hierarchical firewall policy rules.
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $target_tags
     *           The target tags defined by the VPC firewall rule. This field is not
     *           applicable to hierarchical firewall policy rules.
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $target_service_accounts
     *           The target service accounts specified by the firewall rule.
     *     @type string $policy
     *           The hierarchical firewall policy that this rule is associated with.
     *           This field is not applicable to VPC firewall rules.
     *     @type int $firewall_rule_type
     *           The firewall rule's type.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce();
        parent::__construct($data);
    }

    /**
     * The display name of the VPC firewall rule. This field is not applicable
     * to hierarchical firewall policy rules.
     *
     * Generated from protobuf field <code>string display_name = 1;</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * The display name of the VPC firewall rule. This field is not applicable
     * to hierarchical firewall policy rules.
     *
     * Generated from protobuf field <code>string display_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * The URI of the VPC firewall rule. This field is not applicable to
     * implied firewall rules or hierarchical firewall policy rules.
     *
     * Generated from protobuf field <code>string uri = 2;</code>
     * @return string
     */
    public function getUri()
    {
        return $this->uri;
    }

    /**
     * The URI of the VPC firewall rule. This field is not applicable to
     * implied firewall rules or hierarchical firewall policy rules.
     *
     * Generated from protobuf field <code>string uri = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->uri = $var;

        return $this;
    }

    /**
     * Possible values: INGRESS, EGRESS
     *
     * Generated from protobuf field <code>string direction = 3;</code>
     * @return string
     */
    public function getDirection()
    {
        return $this->direction;
    }

    /**
     * Possible values: INGRESS, EGRESS
     *
     * Generated from protobuf field <code>string direction = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setDirection($var)
    {
        GPBUtil::checkString($var, True);
        $this->direction = $var;

        return $this;
    }

    /**
     * Possible values: ALLOW, DENY
     *
     * Generated from protobuf field <code>string action = 4;</code>
     * @return string
     */
    public function getAction()
    {
        return $this->action;
    }

    /**
     * Possible values: ALLOW, DENY
     *
     * Generated from protobuf field <code>string action = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setAction($var)
    {
        GPBUtil::checkString($var, True);
        $this->action = $var;

        return $this;
    }

    /**
     * The priority of the firewall rule.
     *
     * Generated from protobuf field <code>int32 priority = 5;</code>
     * @return int
     */
    public function getPriority()
    {
        return $this->priority;
    }

    /**
     * The priority of the firewall rule.
     *
     * Generated from protobuf field <code>int32 priority = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setPriority($var)
    {
        GPBUtil::checkInt32($var);
        $this->priority = $var;

        return $this;
    }

    /**
     * The URI of the VPC network that the firewall rule is associated with.
     * This field is not applicable to hierarchical firewall policy rules.
     *
     * Generated from protobuf field <code>string network_uri = 6;</code>
     * @return string
     */
    public function getNetworkUri()
    {
        return $this->network_uri;
    }

    /**
     * The URI of the VPC network that the firewall rule is associated with.
     * This field is not applicable to hierarchical firewall policy rules.
     *
     * Generated from protobuf field <code>string network_uri = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setNetworkUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->network_uri = $var;

        return $this;
    }

    /**
     * The target tags defined by the VPC firewall rule. This field is not
     * applicable to hierarchical firewall policy rules.
     *
     * Generated from protobuf field <code>repeated string target_tags = 7;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getTargetTags()
    {
        return $this->target_tags;
    }

    /**
     * The target tags defined by the VPC firewall rule. This field is not
     * applicable to hierarchical firewall policy rules.
     *
     * Generated from protobuf field <code>repeated string target_tags = 7;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setTargetTags($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->target_tags = $arr;

        return $this;
    }

    /**
     * The target service accounts specified by the firewall rule.
     *
     * Generated from protobuf field <code>repeated string target_service_accounts = 8;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getTargetServiceAccounts()
    {
        return $this->target_service_accounts;
    }

    /**
     * The target service accounts specified by the firewall rule.
     *
     * Generated from protobuf field <code>repeated string target_service_accounts = 8;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setTargetServiceAccounts($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->target_service_accounts = $arr;

        return $this;
    }

    /**
     * The hierarchical firewall policy that this rule is associated with.
     * This field is not applicable to VPC firewall rules.
     *
     * Generated from protobuf field <code>string policy = 9;</code>
     * @return string
     */
    public function getPolicy()
    {
        return $this->policy;
    }

    /**
     * The hierarchical firewall policy that this rule is associated with.
     * This field is not applicable to VPC firewall rules.
     *
     * Generated from protobuf field <code>string policy = 9;</code>
     * @param string $var
     * @return $this
     */
    public function setPolicy($var)
    {
        GPBUtil::checkString($var, True);
        $this->policy = $var;

        return $this;
    }

    /**
     * The firewall rule's type.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10;</code>
     * @return int
     */
    public function getFirewallRuleType()
    {
        return $this->firewall_rule_type;
    }

    /**
     * The firewall rule's type.
     *
     * Generated from protobuf field <code>.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setFirewallRuleType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\FirewallInfo\FirewallRuleType::class);
        $this->firewall_rule_type = $var;

        return $this;
    }

}

