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
    Constructor
    Description
    Creates an instance of IngressPortMapping class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the exposedPort property: Specifies the exposed port for the target port.
    boolean
    Get the external property: Specifies whether the app port is accessible outside of the environment.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of IngressPortMapping from the JsonReader.
    int
    Get the targetPort property: Specifies the port user's container listens on.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    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, wait

    Methods 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

      public IngressPortMapping withExternal(boolean external)
      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

      public IngressPortMapping withTargetPort(int targetPort)
      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

      public Integer 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

      public IngressPortMapping withExposedPort(Integer exposedPort)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<IngressPortMapping>
      Throws:
      IOException
    • fromJson

      public static IngressPortMapping fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.