# 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 DestinyLinkedProfilesClientResponse:
detailed_error_trace: t.Optional[str] = None
error_code: t.Optional["PlatformErrorCodes"] = None
error_status: t.Optional[str] = None
message: t.Optional[str] = None
message_data: t.Optional[t.Mapping[str, str]] = None
response: t.Optional["DestinyLinkedProfilesResponse"] = None
throttle_seconds: t.Optional[int] = None
[docs] def to_json(self) -> t.Mapping[str, t.Any]:
return {
"Response": to_json(self.response),
"ErrorCode": to_json(self.error_code),
"ThrottleSeconds": to_json(self.throttle_seconds),
"ErrorStatus": to_json(self.error_status),
"Message": to_json(self.message),
"MessageData": to_json(self.message_data),
"DetailedErrorTrace": to_json(self.detailed_error_trace),
}
[docs]@dt.dataclass(frozen=True)
class DestinyProfileClientResponse:
detailed_error_trace: t.Optional[str] = None
error_code: t.Optional["PlatformErrorCodes"] = None
error_status: t.Optional[str] = None
message: t.Optional[str] = None
message_data: t.Optional[t.Mapping[str, str]] = None
response: t.Optional["DestinyProfileResponse"] = None
throttle_seconds: t.Optional[int] = None
[docs] def to_json(self) -> t.Mapping[str, t.Any]:
return {
"Response": to_json(self.response),
"ErrorCode": to_json(self.error_code),
"ThrottleSeconds": to_json(self.throttle_seconds),
"ErrorStatus": to_json(self.error_status),
"Message": to_json(self.message),
"MessageData": to_json(self.message_data),
"DetailedErrorTrace": to_json(self.detailed_error_trace),
}
[docs]@dt.dataclass(frozen=True)
class DestinyCharacterClientResponse:
detailed_error_trace: t.Optional[str] = None
error_code: t.Optional["PlatformErrorCodes"] = None
error_status: t.Optional[str] = None
message: t.Optional[str] = None
message_data: t.Optional[t.Mapping[str, str]] = None
response: t.Optional["DestinyCharacterResponse"] = None
throttle_seconds: t.Optional[int] = None
[docs] def to_json(self) -> t.Mapping[str, t.Any]:
return {
"Response": to_json(self.response),
"ErrorCode": to_json(self.error_code),
"ThrottleSeconds": to_json(self.throttle_seconds),
"ErrorStatus": to_json(self.error_status),
"Message": to_json(self.message),
"MessageData": to_json(self.message_data),
"DetailedErrorTrace": to_json(self.detailed_error_trace),
}
[docs]@dt.dataclass(frozen=True)
class DestinyItemClientResponse:
detailed_error_trace: t.Optional[str] = None
error_code: t.Optional["PlatformErrorCodes"] = None
error_status: t.Optional[str] = None
message: t.Optional[str] = None
message_data: t.Optional[t.Mapping[str, str]] = None
response: t.Optional["DestinyItemResponse"] = None
throttle_seconds: t.Optional[int] = None
[docs] def to_json(self) -> t.Mapping[str, t.Any]:
return {
"Response": to_json(self.response),
"ErrorCode": to_json(self.error_code),
"ThrottleSeconds": to_json(self.throttle_seconds),
"ErrorStatus": to_json(self.error_status),
"Message": to_json(self.message),
"MessageData": to_json(self.message_data),
"DetailedErrorTrace": to_json(self.detailed_error_trace),
}
[docs]@dt.dataclass(frozen=True)
class DestinyVendorsClientResponse:
detailed_error_trace: t.Optional[str] = None
error_code: t.Optional["PlatformErrorCodes"] = None
error_status: t.Optional[str] = None
message: t.Optional[str] = None
message_data: t.Optional[t.Mapping[str, str]] = None
response: t.Optional["DestinyVendorsResponse"] = None
throttle_seconds: t.Optional[int] = None
[docs] def to_json(self) -> t.Mapping[str, t.Any]:
return {
"Response": to_json(self.response),
"ErrorCode": to_json(self.error_code),
"ThrottleSeconds": to_json(self.throttle_seconds),
"ErrorStatus": to_json(self.error_status),
"Message": to_json(self.message),
"MessageData": to_json(self.message_data),
"DetailedErrorTrace": to_json(self.detailed_error_trace),
}
[docs]@dt.dataclass(frozen=True)
class DestinyVendorClientResponse:
detailed_error_trace: t.Optional[str] = None
error_code: t.Optional["PlatformErrorCodes"] = None
error_status: t.Optional[str] = None
message: t.Optional[str] = None
message_data: t.Optional[t.Mapping[str, str]] = None
response: t.Optional["DestinyVendorResponse"] = None
throttle_seconds: t.Optional[int] = None
[docs] def to_json(self) -> t.Mapping[str, t.Any]:
return {
"Response": to_json(self.response),
"ErrorCode": to_json(self.error_code),
"ThrottleSeconds": to_json(self.throttle_seconds),
"ErrorStatus": to_json(self.error_status),
"Message": to_json(self.message),
"MessageData": to_json(self.message_data),
"DetailedErrorTrace": to_json(self.detailed_error_trace),
}
[docs]@dt.dataclass(frozen=True)
class DestinyPublicVendorsClientResponse:
detailed_error_trace: t.Optional[str] = None
error_code: t.Optional["PlatformErrorCodes"] = None
error_status: t.Optional[str] = None
message: t.Optional[str] = None
message_data: t.Optional[t.Mapping[str, str]] = None
response: t.Optional["DestinyPublicVendorsResponse"] = None
throttle_seconds: t.Optional[int] = None
[docs] def to_json(self) -> t.Mapping[str, t.Any]:
return {
"Response": to_json(self.response),
"ErrorCode": to_json(self.error_code),
"ThrottleSeconds": to_json(self.throttle_seconds),
"ErrorStatus": to_json(self.error_status),
"Message": to_json(self.message),
"MessageData": to_json(self.message_data),
"DetailedErrorTrace": to_json(self.detailed_error_trace),
}
[docs]@dt.dataclass(frozen=True)
class DestinyCollectibleNodeDetailClientResponse:
detailed_error_trace: t.Optional[str] = None
error_code: t.Optional["PlatformErrorCodes"] = None
error_status: t.Optional[str] = None
message: t.Optional[str] = None
message_data: t.Optional[t.Mapping[str, str]] = None
response: t.Optional["DestinyCollectibleNodeDetailResponse"] = None
throttle_seconds: t.Optional[int] = None
[docs] def to_json(self) -> t.Mapping[str, t.Any]:
return {
"Response": to_json(self.response),
"ErrorCode": to_json(self.error_code),
"ThrottleSeconds": to_json(self.throttle_seconds),
"ErrorStatus": to_json(self.error_status),
"Message": to_json(self.message),
"MessageData": to_json(self.message_data),
"DetailedErrorTrace": to_json(self.detailed_error_trace),
}
[docs]@dt.dataclass(frozen=True)
class DestinyItemChangeClientResponse:
detailed_error_trace: t.Optional[str] = None
error_code: t.Optional["PlatformErrorCodes"] = None
error_status: t.Optional[str] = None
message: t.Optional[str] = None
message_data: t.Optional[t.Mapping[str, str]] = None
response: t.Optional["DestinyItemChangeResponse"] = None
throttle_seconds: t.Optional[int] = None
[docs] def to_json(self) -> t.Mapping[str, t.Any]:
return {
"Response": to_json(self.response),
"ErrorCode": to_json(self.error_code),
"ThrottleSeconds": to_json(self.throttle_seconds),
"ErrorStatus": to_json(self.error_status),
"Message": to_json(self.message),
"MessageData": to_json(self.message_data),
"DetailedErrorTrace": to_json(self.detailed_error_trace),
}
# imported at the end to do not case circular imports for type annotations
from bungieapi.generated.components.schemas.destiny.responses import (
DestinyCharacterResponse,
) # noqa: E402
from bungieapi.generated.components.schemas.destiny.responses import (
DestinyCollectibleNodeDetailResponse,
) # noqa: E402
from bungieapi.generated.components.schemas.destiny.responses import (
DestinyItemChangeResponse,
) # noqa: E402
from bungieapi.generated.components.schemas.destiny.responses import (
DestinyItemResponse,
) # noqa: E402
from bungieapi.generated.components.schemas.destiny.responses import (
DestinyLinkedProfilesResponse,
) # noqa: E402
from bungieapi.generated.components.schemas.destiny.responses import (
DestinyProfileResponse,
) # noqa: E402
from bungieapi.generated.components.schemas.destiny.responses import (
DestinyPublicVendorsResponse,
) # noqa: E402
from bungieapi.generated.components.schemas.destiny.responses import (
DestinyVendorResponse,
) # noqa: E402
from bungieapi.generated.components.schemas.destiny.responses import (
DestinyVendorsResponse,
) # noqa: E402
from bungieapi.generated.components.schemas.exceptions import (
PlatformErrorCodes,
) # noqa: E402