Class IpRules.Builder (2.76.0)

public static final class IpRules.Builder extends GeneratedMessageV3.Builder<IpRules.Builder> implements IpRulesOrBuilder

IP rules associated with the finding.

Protobuf type google.cloud.securitycenter.v2.IpRules

Implements

IpRulesOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllDestinationIpRanges(Iterable<String> values)

public IpRules.Builder addAllDestinationIpRanges(Iterable<String> values)

If destination IP ranges are specified, the firewall rule applies only to traffic that has a destination IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.

repeated string destination_ip_ranges = 5;

Parameter
Name Description
values Iterable<String>

The destinationIpRanges to add.

Returns
Type Description
IpRules.Builder

This builder for chaining.

addAllExposedServices(Iterable<String> values)

public IpRules.Builder addAllExposedServices(Iterable<String> values)

Name of the network protocol service, such as FTP, that is exposed by the open port. Follows the naming convention available at: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml.

repeated string exposed_services = 6;

Parameter
Name Description
values Iterable<String>

The exposedServices to add.

Returns
Type Description
IpRules.Builder

This builder for chaining.

addAllSourceIpRanges(Iterable<String> values)

public IpRules.Builder addAllSourceIpRanges(Iterable<String> values)

If source IP ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.

repeated string source_ip_ranges = 4;

Parameter
Name Description
values Iterable<String>

The sourceIpRanges to add.

Returns
Type Description
IpRules.Builder

This builder for chaining.

addDestinationIpRanges(String value)

public IpRules.Builder addDestinationIpRanges(String value)

If destination IP ranges are specified, the firewall rule applies only to traffic that has a destination IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.

repeated string destination_ip_ranges = 5;

Parameter
Name Description
value String

The destinationIpRanges to add.

Returns
Type Description
IpRules.Builder

This builder for chaining.

addDestinationIpRangesBytes(ByteString value)

public IpRules.Builder addDestinationIpRangesBytes(ByteString value)

If destination IP ranges are specified, the firewall rule applies only to traffic that has a destination IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.

repeated string destination_ip_ranges = 5;

Parameter
Name Description
value ByteString

The bytes of the destinationIpRanges to add.

Returns
Type Description
IpRules.Builder

This builder for chaining.

addExposedServices(String value)

public IpRules.Builder addExposedServices(String value)

Name of the network protocol service, such as FTP, that is exposed by the open port. Follows the naming convention available at: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml.

repeated string exposed_services = 6;

Parameter
Name Description
value String

The exposedServices to add.

Returns
Type Description
IpRules.Builder

This builder for chaining.

addExposedServicesBytes(ByteString value)

public IpRules.Builder addExposedServicesBytes(ByteString value)

Name of the network protocol service, such as FTP, that is exposed by the open port. Follows the naming convention available at: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml.

repeated string exposed_services = 6;

Parameter
Name Description
value ByteString

The bytes of the exposedServices to add.

Returns
Type Description
IpRules.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public IpRules.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
IpRules.Builder
Overrides

addSourceIpRanges(String value)

public IpRules.Builder addSourceIpRanges(String value)

If source IP ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.

repeated string source_ip_ranges = 4;

Parameter
Name Description
value String

The sourceIpRanges to add.

Returns
Type Description
IpRules.Builder

This builder for chaining.

addSourceIpRangesBytes(ByteString value)

public IpRules.Builder addSourceIpRangesBytes(ByteString value)

If source IP ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.

repeated string source_ip_ranges = 4;

Parameter
Name Description
value ByteString

The bytes of the sourceIpRanges to add.

Returns
Type Description
IpRules.Builder

This builder for chaining.

build()

public IpRules build()
Returns
Type Description
IpRules

buildPartial()

public IpRules buildPartial()
Returns
Type Description
IpRules

clear()

public IpRules.Builder clear()
Returns
Type Description
IpRules.Builder
Overrides

clearAllowed()

public IpRules.Builder clearAllowed()

Tuple with allowed rules.

.google.cloud.securitycenter.v2.Allowed allowed = 2;

Returns
Type Description
IpRules.Builder

clearDenied()

public IpRules.Builder clearDenied()

Tuple with denied rules.

.google.cloud.securitycenter.v2.Denied denied = 3;

Returns
Type Description
IpRules.Builder

clearDestinationIpRanges()

public IpRules.Builder clearDestinationIpRanges()

If destination IP ranges are specified, the firewall rule applies only to traffic that has a destination IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.

repeated string destination_ip_ranges = 5;

Returns
Type Description
IpRules.Builder

This builder for chaining.

clearDirection()

public IpRules.Builder clearDirection()

The direction that the rule is applicable to, one of ingress or egress.

.google.cloud.securitycenter.v2.IpRules.Direction direction = 1;

Returns
Type Description
IpRules.Builder

This builder for chaining.

clearExposedServices()

public IpRules.Builder clearExposedServices()

Name of the network protocol service, such as FTP, that is exposed by the open port. Follows the naming convention available at: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml.

repeated string exposed_services = 6;

Returns
Type Description
IpRules.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public IpRules.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
IpRules.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public IpRules.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
IpRules.Builder
Overrides

clearRules()

public IpRules.Builder clearRules()
Returns
Type Description
IpRules.Builder

clearSourceIpRanges()

public IpRules.Builder clearSourceIpRanges()

If source IP ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.

repeated string source_ip_ranges = 4;

Returns
Type Description
IpRules.Builder

This builder for chaining.

clone()

public IpRules.Builder clone()
Returns
Type Description
IpRules.Builder
Overrides

getAllowed()

public Allowed getAllowed()

Tuple with allowed rules.

.google.cloud.securitycenter.v2.Allowed allowed = 2;

Returns
Type Description
Allowed

The allowed.

getAllowedBuilder()

public Allowed.Builder getAllowedBuilder()

Tuple with allowed rules.

.google.cloud.securitycenter.v2.Allowed allowed = 2;

Returns
Type Description
Allowed.Builder

getAllowedOrBuilder()

public AllowedOrBuilder getAllowedOrBuilder()

Tuple with allowed rules.

.google.cloud.securitycenter.v2.Allowed allowed = 2;

Returns
Type Description
AllowedOrBuilder

getDefaultInstanceForType()

public IpRules getDefaultInstanceForType()
Returns
Type Description
IpRules

getDenied()

public Denied getDenied()

Tuple with denied rules.

.google.cloud.securitycenter.v2.Denied denied = 3;

Returns
Type Description
Denied

The denied.

getDeniedBuilder()

public Denied.Builder getDeniedBuilder()

Tuple with denied rules.

.google.cloud.securitycenter.v2.Denied denied = 3;

Returns
Type Description
Denied.Builder

getDeniedOrBuilder()

public DeniedOrBuilder getDeniedOrBuilder()

Tuple with denied rules.

.google.cloud.securitycenter.v2.Denied denied = 3;

Returns
Type Description
DeniedOrBuilder

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDestinationIpRanges(int index)

public String getDestinationIpRanges(int index)

If destination IP ranges are specified, the firewall rule applies only to traffic that has a destination IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.

repeated string destination_ip_ranges = 5;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The destinationIpRanges at the given index.

getDestinationIpRangesBytes(int index)

public ByteString getDestinationIpRangesBytes(int index)

If destination IP ranges are specified, the firewall rule applies only to traffic that has a destination IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.

repeated string destination_ip_ranges = 5;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the destinationIpRanges at the given index.

getDestinationIpRangesCount()

public int getDestinationIpRangesCount()

If destination IP ranges are specified, the firewall rule applies only to traffic that has a destination IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.

repeated string destination_ip_ranges = 5;

Returns
Type Description
int

The count of destinationIpRanges.

getDestinationIpRangesList()

public ProtocolStringList getDestinationIpRangesList()

If destination IP ranges are specified, the firewall rule applies only to traffic that has a destination IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.

repeated string destination_ip_ranges = 5;

Returns
Type Description
ProtocolStringList

A list containing the destinationIpRanges.

getDirection()

public IpRules.Direction getDirection()

The direction that the rule is applicable to, one of ingress or egress.

.google.cloud.securitycenter.v2.IpRules.Direction direction = 1;

Returns
Type Description
IpRules.Direction

The direction.

getDirectionValue()

public int getDirectionValue()

The direction that the rule is applicable to, one of ingress or egress.

.google.cloud.securitycenter.v2.IpRules.Direction direction = 1;

Returns
Type Description
int

The enum numeric value on the wire for direction.

getExposedServices(int index)

public String getExposedServices(int index)

Name of the network protocol service, such as FTP, that is exposed by the open port. Follows the naming convention available at: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml.

repeated string exposed_services = 6;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The exposedServices at the given index.

getExposedServicesBytes(int index)

public ByteString getExposedServicesBytes(int index)

Name of the network protocol service, such as FTP, that is exposed by the open port. Follows the naming convention available at: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml.

repeated string exposed_services = 6;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the exposedServices at the given index.

getExposedServicesCount()

public int getExposedServicesCount()

Name of the network protocol service, such as FTP, that is exposed by the open port. Follows the naming convention available at: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml.

repeated string exposed_services = 6;

Returns
Type Description
int

The count of exposedServices.

getExposedServicesList()

public ProtocolStringList getExposedServicesList()

Name of the network protocol service, such as FTP, that is exposed by the open port. Follows the naming convention available at: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml.

repeated string exposed_services = 6;

Returns
Type Description
ProtocolStringList

A list containing the exposedServices.

getRulesCase()

public IpRules.RulesCase getRulesCase()
Returns
Type Description
IpRules.RulesCase

getSourceIpRanges(int index)

public String getSourceIpRanges(int index)

If source IP ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.

repeated string source_ip_ranges = 4;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The sourceIpRanges at the given index.

getSourceIpRangesBytes(int index)

public ByteString getSourceIpRangesBytes(int index)

If source IP ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.

repeated string source_ip_ranges = 4;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the sourceIpRanges at the given index.

getSourceIpRangesCount()

public int getSourceIpRangesCount()

If source IP ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.

repeated string source_ip_ranges = 4;

Returns
Type Description
int

The count of sourceIpRanges.

getSourceIpRangesList()

public ProtocolStringList getSourceIpRangesList()

If source IP ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.

repeated string source_ip_ranges = 4;

Returns
Type Description
ProtocolStringList

A list containing the sourceIpRanges.

hasAllowed()

public boolean hasAllowed()

Tuple with allowed rules.

.google.cloud.securitycenter.v2.Allowed allowed = 2;

Returns
Type Description
boolean

Whether the allowed field is set.

hasDenied()

public boolean hasDenied()

Tuple with denied rules.

.google.cloud.securitycenter.v2.Denied denied = 3;

Returns
Type Description
boolean

Whether the denied field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAllowed(Allowed value)

public IpRules.Builder mergeAllowed(Allowed value)

Tuple with allowed rules.

.google.cloud.securitycenter.v2.Allowed allowed = 2;

Parameter
Name Description
value Allowed
Returns
Type Description
IpRules.Builder

mergeDenied(Denied value)

public IpRules.Builder mergeDenied(Denied value)

Tuple with denied rules.

.google.cloud.securitycenter.v2.Denied denied = 3;

Parameter
Name Description
value Denied
Returns
Type Description
IpRules.Builder

mergeFrom(IpRules other)

public IpRules.Builder mergeFrom(IpRules other)
Parameter
Name Description
other IpRules
Returns
Type Description
IpRules.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public IpRules.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
IpRules.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public IpRules.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
IpRules.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final IpRules.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
IpRules.Builder
Overrides

setAllowed(Allowed value)

public IpRules.Builder setAllowed(Allowed value)

Tuple with allowed rules.

.google.cloud.securitycenter.v2.Allowed allowed = 2;

Parameter
Name Description
value Allowed
Returns
Type Description
IpRules.Builder

setAllowed(Allowed.Builder builderForValue)

public IpRules.Builder setAllowed(Allowed.Builder builderForValue)

Tuple with allowed rules.

.google.cloud.securitycenter.v2.Allowed allowed = 2;

Parameter
Name Description
builderForValue Allowed.Builder
Returns
Type Description
IpRules.Builder

setDenied(Denied value)

public IpRules.Builder setDenied(Denied value)

Tuple with denied rules.

.google.cloud.securitycenter.v2.Denied denied = 3;

Parameter
Name Description
value Denied
Returns
Type Description
IpRules.Builder

setDenied(Denied.Builder builderForValue)

public IpRules.Builder setDenied(Denied.Builder builderForValue)

Tuple with denied rules.

.google.cloud.securitycenter.v2.Denied denied = 3;

Parameter
Name Description
builderForValue Denied.Builder
Returns
Type Description
IpRules.Builder

setDestinationIpRanges(int index, String value)

public IpRules.Builder setDestinationIpRanges(int index, String value)

If destination IP ranges are specified, the firewall rule applies only to traffic that has a destination IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.

repeated string destination_ip_ranges = 5;

Parameters
Name Description
index int

The index to set the value at.

value String

The destinationIpRanges to set.

Returns
Type Description
IpRules.Builder

This builder for chaining.

setDirection(IpRules.Direction value)

public IpRules.Builder setDirection(IpRules.Direction value)

The direction that the rule is applicable to, one of ingress or egress.

.google.cloud.securitycenter.v2.IpRules.Direction direction = 1;

Parameter
Name Description
value IpRules.Direction

The direction to set.

Returns
Type Description
IpRules.Builder

This builder for chaining.

setDirectionValue(int value)

public IpRules.Builder setDirectionValue(int value)

The direction that the rule is applicable to, one of ingress or egress.

.google.cloud.securitycenter.v2.IpRules.Direction direction = 1;

Parameter
Name Description
value int

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

Returns
Type Description
IpRules.Builder

This builder for chaining.

setExposedServices(int index, String value)

public IpRules.Builder setExposedServices(int index, String value)

Name of the network protocol service, such as FTP, that is exposed by the open port. Follows the naming convention available at: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml.

repeated string exposed_services = 6;

Parameters
Name Description
index int

The index to set the value at.

value String

The exposedServices to set.

Returns
Type Description
IpRules.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public IpRules.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
IpRules.Builder
Overrides

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

public IpRules.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
IpRules.Builder
Overrides

setSourceIpRanges(int index, String value)

public IpRules.Builder setSourceIpRanges(int index, String value)

If source IP ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed in CIDR format. Only supports IPv4.

repeated string source_ip_ranges = 4;

Parameters
Name Description
index int

The index to set the value at.

value String

The sourceIpRanges to set.

Returns
Type Description
IpRules.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final IpRules.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
IpRules.Builder
Overrides