Class Resource

    • Constructor Detail

      • Resource

        public Resource()
    • Method Detail

      • type

        public Resource type​(ResourceType type)
        type
        Parameters:
        type -
        Returns:
        the current Resource instance, allowing for method chaining
      • getType

        public ResourceType getType()
        Get type
        Returns:
        type
      • setType

        public void setType​(ResourceType type)
        type
        Parameters:
        type -
      • equals

        public boolean equals​(Object o)
        Return true if this Resource object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

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

        public static Resource fromJson​(String jsonString)
                                 throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of Resource given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of Resource
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to Resource
      • toJson

        public String toJson()
                      throws com.fasterxml.jackson.core.JsonProcessingException
        Convert an instance of Resource to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException