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.
- Since:
- 0.8
- Suppressed Checkstyle violations:
- MultipleStringLiterals (500 lines)
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jcabi.github.ReleaseAsset
ReleaseAsset.Smart -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet its content type.When it was created.intGet its downloadCount.jakarta.json.JsonObjectjson()Describe it in a JSON object.label()Get its label.voidChange its label.name()Get its name.voidChange its name.intnumber()Number.voidpatch(jakarta.json.JsonObject json) Patch using this JSON object.raw()Gets release asset raw content.release()The release we're in.voidremove()Delete the release asset.intsize()Get its size.state()Get its state.When it was updated.url()Get its URL.
-
Constructor Details
-
Smart
Public ctor.- Parameters:
ast- Release asset
-
-
Method Details
-
url
Get its URL.- Returns:
- URL of release asset
- Throws:
IOException- If there is any I/O problem
-
name
Get its name.- Returns:
- Name of release asset
- Throws:
IOException- If there is any I/O problem
-
label
Get its label.- Returns:
- Label of release asset
- Throws:
IOException- If there is any I/O problem
-
state
Get its state.- Returns:
- State of release asset
- Throws:
IOException- If there is any I/O problem
-
contentType
Get its content type.- Returns:
- Content type of release asset
- Throws:
IOException- If there is any I/O problem
-
size
Get its size.- Returns:
- Size of release asset
- Throws:
IOException- If there is any I/O problem
-
downloadCount
Get its downloadCount.- Returns:
- Download count of release asset
- Throws:
IOException- If there is any I/O problem
-
createdAt
When it was created.- Returns:
- Date of creation
- Throws:
IOException- If there is any I/O problem
-
updatedAt
When it was updated.- Returns:
- Date of update
- Throws:
IOException- If there is any I/O problem
-
name
Change its name.- Parameters:
text- Name of release asset- Throws:
IOException- If there is any I/O problem
-
label
Change its label.- Parameters:
text- Label of release asset- Throws:
IOException- If there is any I/O problem
-
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
Description copied from interface:ReleaseAssetDelete the release asset.- Specified by:
removein interfaceReleaseAsset- Throws:
IOException- If there is any I/O problem- See Also:
-
raw
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:
-
patch
Description 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
Description 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
-