Class IpRules (2.76.0)

public final class IpRules extends GeneratedMessageV3 implements IpRulesOrBuilder

IP rules associated with the finding.

Protobuf type google.cloud.securitycenter.v2.IpRules

Implements

IpRulesOrBuilder

Static Fields

ALLOWED_FIELD_NUMBER

public static final int ALLOWED_FIELD_NUMBER
Field Value
Type Description
int

DENIED_FIELD_NUMBER

public static final int DENIED_FIELD_NUMBER
Field Value
Type Description
int

DESTINATION_IP_RANGES_FIELD_NUMBER

public static final int DESTINATION_IP_RANGES_FIELD_NUMBER
Field Value
Type Description
int

DIRECTION_FIELD_NUMBER

public static final int DIRECTION_FIELD_NUMBER
Field Value
Type Description
int

EXPOSED_SERVICES_FIELD_NUMBER

public static final int EXPOSED_SERVICES_FIELD_NUMBER
Field Value
Type Description
int

SOURCE_IP_RANGES_FIELD_NUMBER

public static final int SOURCE_IP_RANGES_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static IpRules getDefaultInstance()
Returns
Type Description
IpRules

getDescriptor()

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

newBuilder()

public static IpRules.Builder newBuilder()
Returns
Type Description
IpRules.Builder

newBuilder(IpRules prototype)

public static IpRules.Builder newBuilder(IpRules prototype)
Parameter
Name Description
prototype IpRules
Returns
Type Description
IpRules.Builder

parseDelimitedFrom(InputStream input)

public static IpRules parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
IpRules
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static IpRules parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
IpRules
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static IpRules parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
IpRules
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static IpRules parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
IpRules
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static IpRules parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
IpRules
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static IpRules parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
IpRules
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static IpRules parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
IpRules
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static IpRules parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
IpRules
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static IpRules parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
IpRules
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static IpRules parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
IpRules
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static IpRules parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
IpRules
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static IpRules parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
IpRules
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<IpRules> parser()
Returns
Type Description
Parser<IpRules>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAllowed()

public Allowed getAllowed()

Tuple with allowed rules.

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

Returns
Type Description
Allowed

The allowed.

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.

getDeniedOrBuilder()

public DeniedOrBuilder getDeniedOrBuilder()

Tuple with denied rules.

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

Returns
Type Description
DeniedOrBuilder

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.

getParserForType()

public Parser<IpRules> getParserForType()
Returns
Type Description
Parser<IpRules>
Overrides

getRulesCase()

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected IpRules.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
IpRules.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException