Class ApiResponseSet

java.lang.Object
org.zaproxy.clientapi.core.ApiResponse
org.zaproxy.clientapi.core.ApiResponseSet

public class ApiResponseSet extends ApiResponse
  • Constructor Details

    • ApiResponseSet

      @Deprecated public ApiResponseSet(String name, String[] attributes)
      Deprecated.
      (1.1.0) Unused, there's no replacement.
      Constructs an ApiResponseSet with the given name and attributes.
      Parameters:
      name - the name of the API response
      attributes - the attributes
    • ApiResponseSet

      public ApiResponseSet(String name, Map<String,ApiResponse> values)
    • ApiResponseSet

      public ApiResponseSet(Node node) throws ClientApiException
      Throws:
      ClientApiException
  • Method Details

    • getAttributes

      @Deprecated public String[] getAttributes()
      Deprecated.
      (1.1.0) Unused, there's no replacement.
      Gets the attributes.
      Returns:
      the attributes, might be null.
      See Also:
    • getAttribute

      @Deprecated public String getAttribute(String key)
      Deprecated.
      Gets the value for the given key.
      Parameters:
      key - the key of the value
      Returns:
      the value, or null if no value exists for the given key.
    • getValue

      public ApiResponse getValue(String key)
      Gets the value for the given key.
      Parameters:
      key - the key of the value
      Returns:
      the value, or null if no value exists for the given key.
      Since:
      1.1.0
      See Also:
    • getStringValue

      public String getStringValue(String key)
      Gets the value for the given key as String.

      For ApiResponseElements it returns its value, for other ApiResponse types it returns the conversion to String.

      Parameters:
      key - the key of the value
      Returns:
      the value, or null if no value exists for the given key.
      Since:
      1.1.0
      See Also:
    • getValuesMap

      public Map<String,ApiResponse> getValuesMap()
      Gets a Map with the keys and values.

      The returned Map is unmodifiable, any attempt to modify it will result in an UnsupportedOperationException.

      Returns:
      the map with the keys/values, never null.
      Since:
      1.1.0
    • getKeys

      public Set<String> getKeys()
      Gets the keys of the values.

      The returned Set is unmodifiable, any attempt to modify it will result in an UnsupportedOperationException.

      Returns:
      the keys, never null.
      Since:
      1.1.0
      See Also:
    • getValues

      public Collection<ApiResponse> getValues()
      Gets the values.

      The returned Collection is unmodifiable, any attempt to modify it will result in an UnsupportedOperationException.

      Returns:
      the values, never null.
      Since:
      1.1.0
      See Also:
    • toString

      public String toString(int indent)
      Specified by:
      toString in class ApiResponse