# Interface FirewallInfoOrBuilder (0.16.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.16.0 (latest)](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.networkmanagement.v1.FirewallInfoOrBuilder)
- [0.15.0](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.networkmanagement.v1.FirewallInfoOrBuilder)
- [0.14.1](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.networkmanagement.v1.FirewallInfoOrBuilder)

    public interface FirewallInfoOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getAction()

    public abstract String getAction()

Possible values: ALLOW, DENY

`string action = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The action. |

### getActionBytes()

    public abstract ByteString getActionBytes()

Possible values: ALLOW, DENY

`string action = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for action. |

### getDirection()

    public abstract String getDirection()

Possible values: INGRESS, EGRESS

`string direction = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The direction. |

### getDirectionBytes()

    public abstract ByteString getDirectionBytes()

Possible values: INGRESS, EGRESS

`string direction = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for direction. |

### getDisplayName()

    public abstract String getDisplayName()

The display name of the VPC firewall rule. This field is not applicable
to hierarchical firewall policy rules.

`string display_name = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The displayName. |

### getDisplayNameBytes()

    public abstract ByteString getDisplayNameBytes()

The display name of the VPC firewall rule. This field is not applicable
to hierarchical firewall policy rules.

`string display_name = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for displayName. |

### getFirewallRuleType()

    public abstract FirewallInfo.FirewallRuleType getFirewallRuleType()

The firewall rule's type.

`
.google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType` | The firewallRuleType. |

### getFirewallRuleTypeValue()

    public abstract int getFirewallRuleTypeValue()

The firewall rule's type.

`
.google.events.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for firewallRuleType. |

### getNetworkUri()

    public abstract String getNetworkUri()

The URI of the VPC network that the firewall rule is associated with.
This field is not applicable to hierarchical firewall policy rules.

`string network_uri = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The networkUri. |

### getNetworkUriBytes()

    public abstract ByteString getNetworkUriBytes()

The URI of the VPC network that the firewall rule is associated with.
This field is not applicable to hierarchical firewall policy rules.

`string network_uri = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for networkUri. |

### getPolicy()

    public abstract String getPolicy()

The hierarchical firewall policy that this rule is associated with.
This field is not applicable to VPC firewall rules.

`string policy = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The policy. |

### getPolicyBytes()

    public abstract ByteString getPolicyBytes()

The hierarchical firewall policy that this rule is associated with.
This field is not applicable to VPC firewall rules.

`string policy = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for policy. |

### getPriority()

    public abstract int getPriority()

The priority of the firewall rule.

`int32 priority = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The priority. |

### getTargetServiceAccounts(int index)

    public abstract String getTargetServiceAccounts(int index)

The target service accounts specified by the firewall rule.

`repeated string target_service_accounts = 8;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The targetServiceAccounts at the given index. |

### getTargetServiceAccountsBytes(int index)

    public abstract ByteString getTargetServiceAccountsBytes(int index)

The target service accounts specified by the firewall rule.

`repeated string target_service_accounts = 8;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the targetServiceAccounts at the given index. |

### getTargetServiceAccountsCount()

    public abstract int getTargetServiceAccountsCount()

The target service accounts specified by the firewall rule.

`repeated string target_service_accounts = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of targetServiceAccounts. |

### getTargetServiceAccountsList()

    public abstract List<String> getTargetServiceAccountsList()

The target service accounts specified by the firewall rule.

`repeated string target_service_accounts = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the targetServiceAccounts. |

### getTargetTags(int index)

    public abstract String getTargetTags(int index)

The target tags defined by the VPC firewall rule. This field is not
applicable to hierarchical firewall policy rules.

`repeated string target_tags = 7;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The targetTags at the given index. |

### getTargetTagsBytes(int index)

    public abstract ByteString getTargetTagsBytes(int index)

The target tags defined by the VPC firewall rule. This field is not
applicable to hierarchical firewall policy rules.

`repeated string target_tags = 7;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the targetTags at the given index. |

### getTargetTagsCount()

    public abstract int getTargetTagsCount()

The target tags defined by the VPC firewall rule. This field is not
applicable to hierarchical firewall policy rules.

`repeated string target_tags = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of targetTags. |

### getTargetTagsList()

    public abstract List<String> getTargetTagsList()

The target tags defined by the VPC firewall rule. This field is not
applicable to hierarchical firewall policy rules.

`repeated string target_tags = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the targetTags. |

### getUri()

    public abstract String getUri()

The URI of the VPC firewall rule. This field is not applicable to
implied firewall rules or hierarchical firewall policy rules.

`string uri = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The uri. |

### getUriBytes()

    public abstract ByteString getUriBytes()

The URI of the VPC firewall rule. This field is not applicable to
implied firewall rules or hierarchical firewall policy rules.

`string uri = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for uri. |