Class IpRule.PortRange.Builder (2.91.0)

public static final class IpRule.PortRange.Builder extends GeneratedMessage.Builder<IpRule.PortRange.Builder> implements IpRule.PortRangeOrBuilder

A port range which is inclusive of the min and max values. Values are between 0 and 2^16-1. The max can be equal / must be not smaller than the min value. If min and max are equal this indicates that it is a single port.

Protobuf type google.cloud.securitycenter.v2.IpRule.PortRange

Static Methods

getDescriptor()

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

Methods

build()

public IpRule.PortRange build()
Returns
Type Description
IpRule.PortRange

buildPartial()

public IpRule.PortRange buildPartial()
Returns
Type Description
IpRule.PortRange

clear()

public IpRule.PortRange.Builder clear()
Returns
Type Description
IpRule.PortRange.Builder
Overrides

clearMax()

public IpRule.PortRange.Builder clearMax()

Maximum port value.

int64 max = 2;

Returns
Type Description
IpRule.PortRange.Builder

This builder for chaining.

clearMin()

public IpRule.PortRange.Builder clearMin()

Minimum port value.

int64 min = 1;

Returns
Type Description
IpRule.PortRange.Builder

This builder for chaining.

getDefaultInstanceForType()

public IpRule.PortRange getDefaultInstanceForType()
Returns
Type Description
IpRule.PortRange

getDescriptorForType()

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

getMax()

public long getMax()

Maximum port value.

int64 max = 2;

Returns
Type Description
long

The max.

getMin()

public long getMin()

Minimum port value.

int64 min = 1;

Returns
Type Description
long

The min.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(IpRule.PortRange other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setMax(long value)

public IpRule.PortRange.Builder setMax(long value)

Maximum port value.

int64 max = 2;

Parameter
Name Description
value long

The max to set.

Returns
Type Description
IpRule.PortRange.Builder

This builder for chaining.

setMin(long value)

public IpRule.PortRange.Builder setMin(long value)

Minimum port value.

int64 min = 1;

Parameter
Name Description
value long

The min to set.

Returns
Type Description
IpRule.PortRange.Builder

This builder for chaining.