Class NamedPort (1.47.0)

public final class NamedPort extends GeneratedMessageV3 implements NamedPortOrBuilder

The named port. For example: <"http", 80>.

Protobuf type google.cloud.compute.v1.NamedPort

Implements

NamedPortOrBuilder

Static Fields

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

PORT_FIELD_NUMBER

public static final int PORT_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static NamedPort getDefaultInstance()
Returns
TypeDescription
NamedPort

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static NamedPort.Builder newBuilder()
Returns
TypeDescription
NamedPort.Builder

newBuilder(NamedPort prototype)

public static NamedPort.Builder newBuilder(NamedPort prototype)
Parameter
NameDescription
prototypeNamedPort
Returns
TypeDescription
NamedPort.Builder

parseDelimitedFrom(InputStream input)

public static NamedPort parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
NamedPort
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static NamedPort parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NamedPort
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static NamedPort parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
NamedPort
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static NamedPort parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NamedPort
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static NamedPort parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
NamedPort
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static NamedPort parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NamedPort
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static NamedPort parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
NamedPort
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static NamedPort parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NamedPort
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static NamedPort parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
NamedPort
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static NamedPort parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NamedPort
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static NamedPort parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
NamedPort
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static NamedPort parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NamedPort
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<NamedPort> parser()
Returns
TypeDescription
Parser<NamedPort>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public NamedPort getDefaultInstanceForType()
Returns
TypeDescription
NamedPort

getName()

public String getName()

The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.

optional string name = 3373707;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.

optional string name = 3373707;

Returns
TypeDescription
ByteString

The bytes for name.

getParserForType()

public Parser<NamedPort> getParserForType()
Returns
TypeDescription
Parser<NamedPort>
Overrides

getPort()

public int getPort()

The port number, which can be a value between 1 and 65535.

optional int32 port = 3446913;

Returns
TypeDescription
int

The port.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hasName()

public boolean hasName()

The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.

optional string name = 3373707;

Returns
TypeDescription
boolean

Whether the name field is set.

hasPort()

public boolean hasPort()

The port number, which can be a value between 1 and 65535.

optional int32 port = 3446913;

Returns
TypeDescription
boolean

Whether the port field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public NamedPort.Builder newBuilderForType()
Returns
TypeDescription
NamedPort.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected NamedPort.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
NamedPort.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public NamedPort.Builder toBuilder()
Returns
TypeDescription
NamedPort.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException