Class Topology

java.lang.Object
io.github.alersrt.pod4j.openapi.model.Topology

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-11-29T01:29:49.168634544+07:00[Asia/Barnaul]", comments="Generator version: 7.7.0") public class Topology extends Object
This description is taken verbatim from the CSI Spec: A topological domain is a sub-division of a cluster, like \"region\", \"zone\", \"rack\", etc. A topological segment is a specific instance of a topological domain, like \"zone3\", \"rack3\", etc. For example {\"com.company/zone\": \"Z1\", \"com.company/rack\": \"R3\"} Valid keys have two segments: an OPTIONAL prefix and name, separated by a slash (/), for example: \"com.company.example/zone\". The key name segment is REQUIRED. The prefix is OPTIONAL. The key name MUST be 63 characters or less, begin and end with an alphanumeric character ([a-z0-9A-Z]), and contain only dashes (-), underscores (_), dots (.), or alphanumerics in between, for example \"zone\". The key prefix MUST be 63 characters or less, begin and end with a lower-case alphanumeric character ([a-z0-9]), contain only dashes (-), dots (.), or lower-case alphanumerics in between, and follow domain name notation format (https://tools.ietf.org/html/rfc1035#section-2.3.1). The key prefix SHOULD include the plugin's host company name and/or the plugin name, to minimize the possibility of collisions with keys from other plugins. If a key prefix is specified, it MUST be identical across all topology keys returned by the SP (across all RPCs). Keys MUST be case-insensitive. Meaning the keys \"Zone\" and \"zone\" MUST not both exist. Each value (topological segment) MUST contain 1 or more strings. Each string MUST be 63 characters or less and begin and end with an alphanumeric character with '-', '_', '.', or alphanumerics in between.
  • Field Details

  • Constructor Details

    • Topology

      public Topology()
  • Method Details

    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to Topology
    • fromJson

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

      public Topology segments(Map<String,String> segments)
    • putSegmentsItem

      public Topology putSegmentsItem(String key, String segmentsItem)
    • getSegments

      @Nullable public Map<String,String> getSegments()
      Get segments
      Returns:
      segments
    • setSegments

      public void setSegments(Map<String,String> segments)
    • 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
    • toJson

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