Class PeerInfo

java.lang.Object
io.github.alersrt.pod4j.openapi.model.PeerInfo
All Implemented Interfaces:
Serializable

@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class PeerInfo extends Object implements Serializable
PeerInfo represents one peer of an overlay network
See Also:
  • Field Details

  • Constructor Details

    • PeerInfo

      public PeerInfo()
  • Method Details

    • IP

      public PeerInfo IP(String IP)
    • getIP

      @Nullable public String getIP()
      Get IP
      Returns:
      IP
    • setIP

      public void setIP(String IP)
    • name

      public PeerInfo name(String name)
    • getName

      @Nullable public String getName()
      Get name
      Returns:
      name
    • setName

      public void setName(String name)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonObject

      public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOException
      Validates the JSON Object and throws an exception if issues found
      Parameters:
      jsonObj - JSON Object
      Throws:
      IOException - if the JSON Object is invalid with respect to PeerInfo
    • fromJson

      public static PeerInfo fromJson(String jsonString) throws IOException
      Create an instance of PeerInfo given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of PeerInfo
      Throws:
      IOException - if the JSON string is invalid with respect to PeerInfo
    • toJson

      public String toJson()
      Convert an instance of PeerInfo to an JSON string
      Returns:
      JSON string