Source code for bungieapi.generated.components.schemas.destiny.definitions.power_caps
# generated by update to not change manually
import dataclasses as dt
import typing as t
from bungieapi.json import to_json
[docs]@dt.dataclass(frozen=True)
class DestinyPowerCapDefinition:
"""Defines a 'power cap' (limit) for gear items, based on the rarity tier
and season of release."""
hash: t.Optional[
int
] = None # The unique identifier for this entity. Guaranteed to be unique for the type of entity, but not globally. When entities refer to each other in Destiny content, it is this hash that they are referring to.
index: t.Optional[
int
] = None # The index of the entity as it was found in the investment tables.
power_cap: t.Optional[int] = None # The raw value for a power cap.
redacted: t.Optional[
bool
] = None # If this is true, then there is an entity with this identifier/type combination, but BNet is not yet allowed to show it. Sorry!
[docs] def to_json(self) -> t.Mapping[str, t.Any]:
return {
"powerCap": to_json(self.power_cap),
"hash": to_json(self.hash),
"index": to_json(self.index),
"redacted": to_json(self.redacted),
}