Class IpRule (2.76.0)

public final class IpRule extends GeneratedMessageV3 implements IpRuleOrBuilder

IP rule information.

Protobuf type google.cloud.securitycenter.v2.IpRule

Implements

IpRuleOrBuilder

Static Fields

PORT_RANGES_FIELD_NUMBER

public static final int PORT_RANGES_FIELD_NUMBER
Field Value
Type Description
int

PROTOCOL_FIELD_NUMBER

public static final int PROTOCOL_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static IpRule getDefaultInstance()
Returns
Type Description
IpRule

getDescriptor()

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

newBuilder()

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

newBuilder(IpRule prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public IpRule getDefaultInstanceForType()
Returns
Type Description
IpRule

getParserForType()

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

getPortRanges(int index)

public IpRule.PortRange getPortRanges(int index)

Optional. An optional list of ports to which this rule applies. This field is only applicable for the UDP or (S)TCP protocols. Each entry must be either an integer or a range including a min and max port number.

repeated .google.cloud.securitycenter.v2.IpRule.PortRange port_ranges = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
IpRule.PortRange

getPortRangesCount()

public int getPortRangesCount()

Optional. An optional list of ports to which this rule applies. This field is only applicable for the UDP or (S)TCP protocols. Each entry must be either an integer or a range including a min and max port number.

repeated .google.cloud.securitycenter.v2.IpRule.PortRange port_ranges = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getPortRangesList()

public List<IpRule.PortRange> getPortRangesList()

Optional. An optional list of ports to which this rule applies. This field is only applicable for the UDP or (S)TCP protocols. Each entry must be either an integer or a range including a min and max port number.

repeated .google.cloud.securitycenter.v2.IpRule.PortRange port_ranges = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<PortRange>

getPortRangesOrBuilder(int index)

public IpRule.PortRangeOrBuilder getPortRangesOrBuilder(int index)

Optional. An optional list of ports to which this rule applies. This field is only applicable for the UDP or (S)TCP protocols. Each entry must be either an integer or a range including a min and max port number.

repeated .google.cloud.securitycenter.v2.IpRule.PortRange port_ranges = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
IpRule.PortRangeOrBuilder

getPortRangesOrBuilderList()

public List<? extends IpRule.PortRangeOrBuilder> getPortRangesOrBuilderList()

Optional. An optional list of ports to which this rule applies. This field is only applicable for the UDP or (S)TCP protocols. Each entry must be either an integer or a range including a min and max port number.

repeated .google.cloud.securitycenter.v2.IpRule.PortRange port_ranges = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.securitycenter.v2.IpRule.PortRangeOrBuilder>

getProtocol()

public String getProtocol()

The IP protocol this rule applies to. This value can either be one of the following well known protocol strings (TCP, UDP, ICMP, ESP, AH, IPIP, SCTP) or a string representation of the integer value.

string protocol = 1;

Returns
Type Description
String

The protocol.

getProtocolBytes()

public ByteString getProtocolBytes()

The IP protocol this rule applies to. This value can either be one of the following well known protocol strings (TCP, UDP, ICMP, ESP, AH, IPIP, SCTP) or a string representation of the integer value.

string protocol = 1;

Returns
Type Description
ByteString

The bytes for protocol.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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 IpRule.Builder newBuilderForType()
Returns
Type Description
IpRule.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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