QuotaUsedArtifactDto

com.worxbend.codeberg4s.users.account.wire.QuotaUsedArtifactDto
See theQuotaUsedArtifactDto companion object
final case class QuotaUsedArtifactDto(name: Option[String], size: Option[Long], htmlUrl: Option[String])

Forgejo's QuotaUsedArtifact model — one artifact counting towards the quota.

'''Derived from spec/swagger.v1.json, not from a capture'''; see QuotaInfoDto.

==Nothing in these three listings is required, and that is a deliberate reading==

None of the quota usage models carries an identifier: they answer "what is taking up space", not "which object is this". There is therefore no field whose absence would leave a value nobody can use, so every conversion in this file succeeds and a sparse element arrives as a sparse element. The alternative — requiring name, say — would fail a whole page of a diagnostic listing over one entry the instance described poorly, which is the wrong trade for a report a caller is reading to find out why they are over quota.

That is also why these models have no toDomainAt: a path exists to say where a conversion failed, and none of these can. The array conversions still go through com.worxbend.codeberg4s.repositories.wire.Elements.convert so that the day one of these fields becomes load-bearing, the position reporting is already in place.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Converts to the domain. Cannot fail; see the class note.

Converts to the domain. Cannot fail; see the class note.

Attributes

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product