Class IpRule (2.84.0)
public final class IpRule extends GeneratedMessageV3 implements IpRuleOrBuilder
IP rule information.
Protobuf type google.cloud.securitycenter.v2.IpRule
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
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()
newBuilder()
public static IpRule.Builder newBuilder()
newBuilder(IpRule prototype)
public static IpRule.Builder newBuilder(IpRule prototype)
Parameter |
Name |
Description |
prototype |
IpRule
|
public static IpRule parseDelimitedFrom(InputStream input)
Returns |
Type |
Description |
IpRule |
|
public static IpRule parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
IpRule |
|
parseFrom(byte[] data)
public static IpRule parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
Returns |
Type |
Description |
IpRule |
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static IpRule parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
IpRule |
|
parseFrom(ByteString data)
public static IpRule parseFrom(ByteString data)
Returns |
Type |
Description |
IpRule |
|
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static IpRule parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
IpRule |
|
public static IpRule parseFrom(CodedInputStream input)
Returns |
Type |
Description |
IpRule |
|
public static IpRule parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
IpRule |
|
public static IpRule parseFrom(InputStream input)
Returns |
Type |
Description |
IpRule |
|
public static IpRule parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
IpRule |
|
parseFrom(ByteBuffer data)
public static IpRule parseFrom(ByteBuffer data)
Returns |
Type |
Description |
IpRule |
|
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static IpRule parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Returns |
Type |
Description |
IpRule |
|
parser()
public static Parser<IpRule> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
getDefaultInstanceForType()
public IpRule getDefaultInstanceForType()
Returns |
Type |
Description |
IpRule |
|
getParserForType()
public Parser<IpRule> getParserForType()
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
|
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];
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
|
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()
Returns |
Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public IpRule.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected IpRule.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public IpRule.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-11 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-11 UTC."],[],[]]