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