Class WeightedBackend

java.lang.Object
com.ngrok.definitions.WeightedBackend

public class WeightedBackend extends Object
A class encapsulating the WeightedBackend resource.
  • Constructor Details

    • WeightedBackend

      public WeightedBackend(String id, URI uri, OffsetDateTime createdAt, String description, String metadata, Map<String,Long> backends)
      Creates a new instance of WeightedBackend.
      Parameters:
      id - unique identifier for this Weighted backend
      uri - URI of the WeightedBackend API resource
      createdAt - timestamp when the backend was created, RFC 3339 format
      description - human-readable description of this backend. Optional
      metadata - arbitrary user-defined machine-readable data of this backend. Optional
      backends - the ids of the child backends to their weights [0-10000]
  • Method Details

    • getId

      public String getId()
      unique identifier for this Weighted backend
      Returns:
      the value of the property as a String
    • getUri

      public URI getUri()
      URI of the WeightedBackend API resource
      Returns:
      the value of the property as a URI
    • getCreatedAt

      public OffsetDateTime getCreatedAt()
      timestamp when the backend was created, RFC 3339 format
      Returns:
      the value of the property as a OffsetDateTime
    • getDescription

      public String getDescription()
      human-readable description of this backend. Optional
      Returns:
      the value of the property as a String
    • getMetadata

      public String getMetadata()
      arbitrary user-defined machine-readable data of this backend. Optional
      Returns:
      the value of the property as a String
    • getBackends

      public Map<String,Long> getBackends()
      the ids of the child backends to their weights [0-10000]
      Returns:
      the value of the property as a Map of String to Long
    • 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