Class FirewallInfo.Builder (1.22.0)

public static final class FirewallInfo.Builder extends GeneratedMessageV3.Builder<FirewallInfo.Builder> implements FirewallInfoOrBuilder

For display only. Metadata associated with a VPC firewall rule, an implied VPC firewall rule, or a hierarchical firewall policy rule.

Protobuf type google.cloud.networkmanagement.v1.FirewallInfo

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllTargetServiceAccounts(Iterable<String> values)

public FirewallInfo.Builder addAllTargetServiceAccounts(Iterable<String> values)

The target service accounts specified by the firewall rule.

repeated string target_service_accounts = 8;

Parameter
NameDescription
valuesIterable<String>

The targetServiceAccounts to add.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

addAllTargetTags(Iterable<String> values)

public FirewallInfo.Builder addAllTargetTags(Iterable<String> values)

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
NameDescription
valuesIterable<String>

The targetTags to add.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public FirewallInfo.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
FirewallInfo.Builder
Overrides

addTargetServiceAccounts(String value)

public FirewallInfo.Builder addTargetServiceAccounts(String value)

The target service accounts specified by the firewall rule.

repeated string target_service_accounts = 8;

Parameter
NameDescription
valueString

The targetServiceAccounts to add.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

addTargetServiceAccountsBytes(ByteString value)

public FirewallInfo.Builder addTargetServiceAccountsBytes(ByteString value)

The target service accounts specified by the firewall rule.

repeated string target_service_accounts = 8;

Parameter
NameDescription
valueByteString

The bytes of the targetServiceAccounts to add.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

addTargetTags(String value)

public FirewallInfo.Builder addTargetTags(String value)

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
NameDescription
valueString

The targetTags to add.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

addTargetTagsBytes(ByteString value)

public FirewallInfo.Builder addTargetTagsBytes(ByteString value)

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
NameDescription
valueByteString

The bytes of the targetTags to add.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

build()

public FirewallInfo build()
Returns
TypeDescription
FirewallInfo

buildPartial()

public FirewallInfo buildPartial()
Returns
TypeDescription
FirewallInfo

clear()

public FirewallInfo.Builder clear()
Returns
TypeDescription
FirewallInfo.Builder
Overrides

clearAction()

public FirewallInfo.Builder clearAction()

Possible values: ALLOW, DENY

string action = 4;

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

clearDirection()

public FirewallInfo.Builder clearDirection()

Possible values: INGRESS, EGRESS

string direction = 3;

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

clearDisplayName()

public FirewallInfo.Builder clearDisplayName()

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

string display_name = 1;

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public FirewallInfo.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
FirewallInfo.Builder
Overrides

clearFirewallRuleType()

public FirewallInfo.Builder clearFirewallRuleType()

The firewall rule's type.

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

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

clearNetworkUri()

public FirewallInfo.Builder clearNetworkUri()

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
TypeDescription
FirewallInfo.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public FirewallInfo.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
FirewallInfo.Builder
Overrides

clearPolicy()

public FirewallInfo.Builder clearPolicy()

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

string policy = 9;

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

clearPriority()

public FirewallInfo.Builder clearPriority()

The priority of the firewall rule.

int32 priority = 5;

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

clearTargetServiceAccounts()

public FirewallInfo.Builder clearTargetServiceAccounts()

The target service accounts specified by the firewall rule.

repeated string target_service_accounts = 8;

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

clearTargetTags()

public FirewallInfo.Builder clearTargetTags()

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
TypeDescription
FirewallInfo.Builder

This builder for chaining.

clearUri()

public FirewallInfo.Builder clearUri()

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
TypeDescription
FirewallInfo.Builder

This builder for chaining.

clone()

public FirewallInfo.Builder clone()
Returns
TypeDescription
FirewallInfo.Builder
Overrides

getAction()

public String getAction()

Possible values: ALLOW, DENY

string action = 4;

Returns
TypeDescription
String

The action.

getActionBytes()

public ByteString getActionBytes()

Possible values: ALLOW, DENY

string action = 4;

Returns
TypeDescription
ByteString

The bytes for action.

getDefaultInstanceForType()

public FirewallInfo getDefaultInstanceForType()
Returns
TypeDescription
FirewallInfo

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDirection()

public String getDirection()

Possible values: INGRESS, EGRESS

string direction = 3;

Returns
TypeDescription
String

The direction.

getDirectionBytes()

public ByteString getDirectionBytes()

Possible values: INGRESS, EGRESS

string direction = 3;

Returns
TypeDescription
ByteString

The bytes for direction.

getDisplayName()

public 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
TypeDescription
String

The displayName.

getDisplayNameBytes()

public 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
TypeDescription
ByteString

The bytes for displayName.

getFirewallRuleType()

public FirewallInfo.FirewallRuleType getFirewallRuleType()

The firewall rule's type.

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

Returns
TypeDescription
FirewallInfo.FirewallRuleType

The firewallRuleType.

getFirewallRuleTypeValue()

public int getFirewallRuleTypeValue()

The firewall rule's type.

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

Returns
TypeDescription
int

The enum numeric value on the wire for firewallRuleType.

getNetworkUri()

public 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
TypeDescription
String

The networkUri.

getNetworkUriBytes()

public 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
TypeDescription
ByteString

The bytes for networkUri.

getPolicy()

public 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
TypeDescription
String

The policy.

getPolicyBytes()

public 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
TypeDescription
ByteString

The bytes for policy.

getPriority()

public int getPriority()

The priority of the firewall rule.

int32 priority = 5;

Returns
TypeDescription
int

The priority.

getTargetServiceAccounts(int index)

public String getTargetServiceAccounts(int index)

The target service accounts specified by the firewall rule.

repeated string target_service_accounts = 8;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The targetServiceAccounts at the given index.

getTargetServiceAccountsBytes(int index)

public ByteString getTargetServiceAccountsBytes(int index)

The target service accounts specified by the firewall rule.

repeated string target_service_accounts = 8;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the targetServiceAccounts at the given index.

getTargetServiceAccountsCount()

public int getTargetServiceAccountsCount()

The target service accounts specified by the firewall rule.

repeated string target_service_accounts = 8;

Returns
TypeDescription
int

The count of targetServiceAccounts.

getTargetServiceAccountsList()

public ProtocolStringList getTargetServiceAccountsList()

The target service accounts specified by the firewall rule.

repeated string target_service_accounts = 8;

Returns
TypeDescription
ProtocolStringList

A list containing the targetServiceAccounts.

getTargetTags(int index)

public 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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The targetTags at the given index.

getTargetTagsBytes(int index)

public 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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the targetTags at the given index.

getTargetTagsCount()

public 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
TypeDescription
int

The count of targetTags.

getTargetTagsList()

public ProtocolStringList 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
TypeDescription
ProtocolStringList

A list containing the targetTags.

getUri()

public 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
TypeDescription
String

The uri.

getUriBytes()

public 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
TypeDescription
ByteString

The bytes for uri.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(FirewallInfo other)

public FirewallInfo.Builder mergeFrom(FirewallInfo other)
Parameter
NameDescription
otherFirewallInfo
Returns
TypeDescription
FirewallInfo.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public FirewallInfo.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FirewallInfo.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public FirewallInfo.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
FirewallInfo.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final FirewallInfo.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
FirewallInfo.Builder
Overrides

setAction(String value)

public FirewallInfo.Builder setAction(String value)

Possible values: ALLOW, DENY

string action = 4;

Parameter
NameDescription
valueString

The action to set.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

setActionBytes(ByteString value)

public FirewallInfo.Builder setActionBytes(ByteString value)

Possible values: ALLOW, DENY

string action = 4;

Parameter
NameDescription
valueByteString

The bytes for action to set.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

setDirection(String value)

public FirewallInfo.Builder setDirection(String value)

Possible values: INGRESS, EGRESS

string direction = 3;

Parameter
NameDescription
valueString

The direction to set.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

setDirectionBytes(ByteString value)

public FirewallInfo.Builder setDirectionBytes(ByteString value)

Possible values: INGRESS, EGRESS

string direction = 3;

Parameter
NameDescription
valueByteString

The bytes for direction to set.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

setDisplayName(String value)

public FirewallInfo.Builder setDisplayName(String value)

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

string display_name = 1;

Parameter
NameDescription
valueString

The displayName to set.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public FirewallInfo.Builder setDisplayNameBytes(ByteString value)

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

string display_name = 1;

Parameter
NameDescription
valueByteString

The bytes for displayName to set.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public FirewallInfo.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
FirewallInfo.Builder
Overrides

setFirewallRuleType(FirewallInfo.FirewallRuleType value)

public FirewallInfo.Builder setFirewallRuleType(FirewallInfo.FirewallRuleType value)

The firewall rule's type.

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

Parameter
NameDescription
valueFirewallInfo.FirewallRuleType

The firewallRuleType to set.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

setFirewallRuleTypeValue(int value)

public FirewallInfo.Builder setFirewallRuleTypeValue(int value)

The firewall rule's type.

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

Parameter
NameDescription
valueint

The enum numeric value on the wire for firewallRuleType to set.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

setNetworkUri(String value)

public FirewallInfo.Builder setNetworkUri(String value)

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;

Parameter
NameDescription
valueString

The networkUri to set.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

setNetworkUriBytes(ByteString value)

public FirewallInfo.Builder setNetworkUriBytes(ByteString value)

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;

Parameter
NameDescription
valueByteString

The bytes for networkUri to set.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

setPolicy(String value)

public FirewallInfo.Builder setPolicy(String value)

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

string policy = 9;

Parameter
NameDescription
valueString

The policy to set.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

setPolicyBytes(ByteString value)

public FirewallInfo.Builder setPolicyBytes(ByteString value)

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

string policy = 9;

Parameter
NameDescription
valueByteString

The bytes for policy to set.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

setPriority(int value)

public FirewallInfo.Builder setPriority(int value)

The priority of the firewall rule.

int32 priority = 5;

Parameter
NameDescription
valueint

The priority to set.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public FirewallInfo.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
FirewallInfo.Builder
Overrides

setTargetServiceAccounts(int index, String value)

public FirewallInfo.Builder setTargetServiceAccounts(int index, String value)

The target service accounts specified by the firewall rule.

repeated string target_service_accounts = 8;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The targetServiceAccounts to set.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

setTargetTags(int index, String value)

public FirewallInfo.Builder setTargetTags(int index, String value)

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

repeated string target_tags = 7;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The targetTags to set.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final FirewallInfo.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
FirewallInfo.Builder
Overrides

setUri(String value)

public FirewallInfo.Builder setUri(String value)

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

string uri = 2;

Parameter
NameDescription
valueString

The uri to set.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.

setUriBytes(ByteString value)

public FirewallInfo.Builder setUriBytes(ByteString value)

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

string uri = 2;

Parameter
NameDescription
valueByteString

The bytes for uri to set.

Returns
TypeDescription
FirewallInfo.Builder

This builder for chaining.