Port Class
- java.
lang. Object - com.
azure. resourcemanager. containerinstance. models. Port
- com.
Implements
public final class Port
implements JsonSerializable<Port>
The port exposed on the container group.
Constructor Summary
Constructor | Description |
---|---|
Port() |
Creates an instance of Port class. |
Method Summary
Modifier and Type | Method and Description |
---|---|
static Port |
fromJson(JsonReader jsonReader)
Reads an instance of Port from the Json |
int |
port()
Get the port property: The port number. |
Container |
protocol()
Get the protocol property: The protocol associated with the port. |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Port |
withPort(int port)
Set the port property: The port number. |
Port |
withProtocol(ContainerGroupNetworkProtocol protocol)
Set the protocol property: The protocol associated with the port. |
Methods inherited from java.lang.Object
Constructor Details
Port
public Port()
Creates an instance of Port class.
Method Details
fromJson
public static Port fromJson(JsonReader jsonReader)
Reads an instance of Port from the JsonReader.
Parameters:
Returns:
Throws:
port
public int port()
Get the port property: The port number.
Returns:
protocol
public ContainerGroupNetworkProtocol protocol()
Get the protocol property: The protocol associated with the port.
Returns:
toJson
validate
public void validate()
Validates the instance.
withPort
public Port withPort(int port)
Set the port property: The port number.
Parameters:
Returns:
withProtocol
public Port withProtocol(ContainerGroupNetworkProtocol protocol)
Set the protocol property: The protocol associated with the port.
Parameters:
Returns:
Applies to
Azure SDK for Java