Class ReleaseAsset.Smart

java.lang.Object
com.jcabi.github.ReleaseAsset.Smart
All Implemented Interfaces:
JsonPatchable, JsonReadable, ReleaseAsset
Enclosing interface:
ReleaseAsset

@Immutable @Loggable(1) public static final class ReleaseAsset.Smart extends Object implements ReleaseAsset
Smart ReleaseAsset with extra features.
Since:
0.8
Suppressed Checkstyle violations:
MultipleStringLiterals (500 lines)
  • Constructor Details

    • Smart

      public Smart(ReleaseAsset ast)
      Public ctor.
      Parameters:
      ast - Release asset
  • Method Details

    • url

      public URL url() throws IOException
      Get its URL.
      Returns:
      URL of release asset
      Throws:
      IOException - If there is any I/O problem
    • name

      public String name() throws IOException
      Get its name.
      Returns:
      Name of release asset
      Throws:
      IOException - If there is any I/O problem
    • label

      public String label() throws IOException
      Get its label.
      Returns:
      Label of release asset
      Throws:
      IOException - If there is any I/O problem
    • state

      public String state() throws IOException
      Get its state.
      Returns:
      State of release asset
      Throws:
      IOException - If there is any I/O problem
    • contentType

      public String contentType() throws IOException
      Get its content type.
      Returns:
      Content type of release asset
      Throws:
      IOException - If there is any I/O problem
    • size

      public int size() throws IOException
      Get its size.
      Returns:
      Size of release asset
      Throws:
      IOException - If there is any I/O problem
    • downloadCount

      public int downloadCount() throws IOException
      Get its downloadCount.
      Returns:
      Download count of release asset
      Throws:
      IOException - If there is any I/O problem
    • createdAt

      public Date createdAt() throws IOException
      When it was created.
      Returns:
      Date of creation
      Throws:
      IOException - If there is any I/O problem
    • updatedAt

      public Date updatedAt() throws IOException
      When it was updated.
      Returns:
      Date of update
      Throws:
      IOException - If there is any I/O problem
    • name

      public void name(String text) throws IOException
      Change its name.
      Parameters:
      text - Name of release asset
      Throws:
      IOException - If there is any I/O problem
    • label

      public void label(String text) throws IOException
      Change its label.
      Parameters:
      text - Label of release asset
      Throws:
      IOException - If there is any I/O problem
    • release

      public Release release()
      Description copied from interface: ReleaseAsset
      The release we're in.
      Specified by:
      release in interface ReleaseAsset
      Returns:
      Release
    • number

      public int number()
      Description copied from interface: ReleaseAsset
      Number.
      Specified by:
      number in interface ReleaseAsset
      Returns:
      Release asset number
    • remove

      public void remove() throws IOException
      Description copied from interface: ReleaseAsset
      Delete the release asset.
      Specified by:
      remove in interface ReleaseAsset
      Throws:
      IOException - If there is any I/O problem
      See Also:
    • raw

      public InputStream raw() throws IOException
      Description copied from interface: ReleaseAsset
      Gets release asset raw content.
      Specified by:
      raw in interface ReleaseAsset
      Returns:
      Release asset number
      Throws:
      IOException - If there is any I/O problem
      See Also:
    • patch

      public void patch(jakarta.json.JsonObject json) throws IOException
      Description copied from interface: JsonPatchable
      Patch using this JSON object.
      Specified by:
      patch in interface JsonPatchable
      Parameters:
      json - JSON object
      Throws:
      IOException - If there is any I/O problem
    • json

      public jakarta.json.JsonObject json() throws IOException
      Description copied from interface: JsonReadable
      Describe it in a JSON object.
      Specified by:
      json in interface JsonReadable
      Returns:
      JSON object
      Throws:
      IOException - If there is any I/O problem