Class IngressPortMapping
java.lang.Object
com.azure.resourcemanager.appcontainers.models.IngressPortMapping
- All Implemented Interfaces:
com.azure.json.JsonSerializable<IngressPortMapping>
public final class IngressPortMapping
extends Object
implements com.azure.json.JsonSerializable<IngressPortMapping>
Port mappings of container app ingress.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the exposedPort property: Specifies the exposed port for the target port.booleanexternal()Get the external property: Specifies whether the app port is accessible outside of the environment.static IngressPortMappingfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of IngressPortMapping from the JsonReader.intGet the targetPort property: Specifies the port user's container listens on.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withExposedPort(Integer exposedPort) Set the exposedPort property: Specifies the exposed port for the target port.withExternal(boolean external) Set the external property: Specifies whether the app port is accessible outside of the environment.withTargetPort(int targetPort) Set the targetPort property: Specifies the port user's container listens on.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
IngressPortMapping
public IngressPortMapping()Creates an instance of IngressPortMapping class.
-
-
Method Details
-
external
public boolean external()Get the external property: Specifies whether the app port is accessible outside of the environment.- Returns:
- the external value.
-
withExternal
Set the external property: Specifies whether the app port is accessible outside of the environment.- Parameters:
external- the external value to set.- Returns:
- the IngressPortMapping object itself.
-
targetPort
public int targetPort()Get the targetPort property: Specifies the port user's container listens on.- Returns:
- the targetPort value.
-
withTargetPort
Set the targetPort property: Specifies the port user's container listens on.- Parameters:
targetPort- the targetPort value to set.- Returns:
- the IngressPortMapping object itself.
-
exposedPort
Get the exposedPort property: Specifies the exposed port for the target port. If not specified, it defaults to target port.- Returns:
- the exposedPort value.
-
withExposedPort
Set the exposedPort property: Specifies the exposed port for the target port. If not specified, it defaults to target port.- Parameters:
exposedPort- the exposedPort value to set.- Returns:
- the IngressPortMapping object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<IngressPortMapping>- Throws:
IOException
-
fromJson
Reads an instance of IngressPortMapping from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of IngressPortMapping if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the IngressPortMapping.
-