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 String
contentType()
Get its content type.Date
createdAt()
When it was created.int
downloadCount()
Get its downloadCount.javax.json.JsonObject
json()
Describe it in a JSON object.String
label()
Get its label.void
label(String text)
Change its label.String
name()
Get its name.void
name(String text)
Change its name.int
number()
Number.void
patch(javax.json.JsonObject json)
Patch using this JSON object.InputStream
raw()
Gets release asset raw content.Release
release()
The release we're in.void
remove()
Delete the release asset.int
size()
Get its size.String
state()
Get its state.Date
updatedAt()
When it was updated.URL
url()
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 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 interfaceReleaseAsset
- Returns:
- Release
-
number
public int number()
Description copied from interface:ReleaseAsset
Number.- Specified by:
number
in interfaceReleaseAsset
- Returns:
- Release asset number
-
remove
public void remove() throws IOException
Description copied from interface:ReleaseAsset
Delete the release asset.- Specified by:
remove
in 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:ReleaseAsset
Gets release asset raw content.- Specified by:
raw
in 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 IOException
Description copied from interface:JsonPatchable
Patch using this JSON object.- Specified by:
patch
in interfaceJsonPatchable
- Parameters:
json
- JSON object- Throws:
IOException
- If there is any I/O problem
-
json
public javax.json.JsonObject json() throws IOException
Description copied from interface:JsonReadable
Describe it in a JSON object.- Specified by:
json
in interfaceJsonReadable
- Returns:
- JSON object
- Throws:
IOException
- If there is any I/O problem
-
-