Class Port
- java.lang.Object
-
- com.azure.resourcemanager.containerinstance.models.Port
-
public final class Port extends Object
The port exposed on the container group.
-
-
Constructor Summary
Constructors Constructor Description Port()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intport()Get the port property: The port number.ContainerGroupNetworkProtocolprotocol()Get the protocol property: The protocol associated with the port.voidvalidate()Validates the instance.PortwithPort(int port)Set the port property: The port number.PortwithProtocol(ContainerGroupNetworkProtocol protocol)Set the protocol property: The protocol associated with the port.
-
-
-
Method Detail
-
protocol
public ContainerGroupNetworkProtocol protocol()
Get the protocol property: The protocol associated with the port.- Returns:
- the protocol value.
-
withProtocol
public Port withProtocol(ContainerGroupNetworkProtocol protocol)
Set the protocol property: The protocol associated with the port.- Parameters:
protocol- the protocol value to set.- Returns:
- the Port object itself.
-
port
public int port()
Get the port property: The port number.- Returns:
- the port value.
-
withPort
public Port withPort(int port)
Set the port property: The port number.- Parameters:
port- the port value to set.- Returns:
- the Port object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-