Package com.jcabi.github
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.- Suppressed Checkstyle violations:
- MultipleStringLiterals (500 lines)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.jcabi.github.ReleaseAsset
ReleaseAsset.Smart
-
-
Constructor Summary
Constructors Constructor Description Smart(ReleaseAsset ast)Public ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcontentType()Get its content type.DatecreatedAt()When it was created.intdownloadCount()Get its downloadCount.javax.json.JsonObjectjson()Describe it in a JSON object.Stringlabel()Get its label.voidlabel(String text)Change its label.Stringname()Get its name.voidname(String text)Change its name.intnumber()Number.voidpatch(javax.json.JsonObject json)Patch using this JSON object.InputStreamraw()Gets release asset raw content.Releaserelease()The release we're in.voidremove()Delete the release asset.intsize()Get its size.Stringstate()Get its state.DateupdatedAt()When it was updated.URLurl()Get its URL.
-
-
-
Constructor Detail
-
Smart
public Smart(ReleaseAsset ast)
Public ctor.- Parameters:
ast- Release asset
-
-
Method Detail
-
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 IOExceptionGet its size.- Returns:
- Size of release asset
- Throws:
IOException- If there is any I/O problem
-
downloadCount
public int downloadCount() throws IOExceptionGet 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:ReleaseAssetThe release we're in.- Specified by:
releasein interfaceReleaseAsset- Returns:
- Release
-
number
public int number()
Description copied from interface:ReleaseAssetNumber.- Specified by:
numberin interfaceReleaseAsset- Returns:
- Release asset number
-
remove
public void remove() throws IOExceptionDescription copied from interface:ReleaseAssetDelete the release asset.- Specified by:
removein interfaceReleaseAsset- Throws:
IOException- If there is any I/O problem- See Also:
- Delete a Release Asset
-
raw
public InputStream raw() throws IOException
Description copied from interface:ReleaseAssetGets release asset raw content.- Specified by:
rawin interfaceReleaseAsset- Returns:
- Release asset number
- Throws:
IOException- If there is any I/O problem- See Also:
- Get a single release asset
-
patch
public void patch(javax.json.JsonObject json) throws IOExceptionDescription copied from interface:JsonPatchablePatch using this JSON object.- Specified by:
patchin interfaceJsonPatchable- Parameters:
json- JSON object- Throws:
IOException- If there is any I/O problem
-
json
public javax.json.JsonObject json() throws IOExceptionDescription copied from interface:JsonReadableDescribe it in a JSON object.- Specified by:
jsonin interfaceJsonReadable- Returns:
- JSON object
- Throws:
IOException- If there is any I/O problem
-
-