Debian Codegraph @

gen/pb-python/sigstore_protobuf_specs/io/intoto/__init__.py

raw
1 # Generated by the protocol buffer compiler. DO NOT EDIT!
2 # sources: envelope.proto
3 # plugin: python-betterproto
4 # This file has been @generated
5
6 from typing import TYPE_CHECKING
7
8 if TYPE_CHECKING:
9 from dataclasses import dataclass
10 else:
11 from pydantic.dataclasses import dataclass
12
13 from typing import List
14
15 import betterproto
16 from pydantic.dataclasses import rebuild_dataclass
17
18
19 @dataclass(eq=False, repr=False)
20 class Envelope(betterproto.Message):
21 """An authenticated message of arbitrary type."""
22
23 payload: bytes = betterproto.bytes_field(1)
24 """
25 Message to be signed. (In JSON, this is encoded as base64.)
26 REQUIRED.
27 """
28
29 payload_type: str = betterproto.string_field(2)
30 """
31 String unambiguously identifying how to interpret payload.
32 REQUIRED.
33 """
34
35 signatures: List["Signature"] = betterproto.message_field(3)
36 """
37 Signature over:
38 PAE(type, payload)
39 Where PAE is defined as:
40 PAE(type, payload) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(payload) + SP + payload
41 + = concatenation
42 SP = ASCII space [0x20]
43 "DSSEv1" = ASCII [0x44, 0x53, 0x53, 0x45, 0x76, 0x31]
44 LEN(s) = ASCII decimal encoding of the byte length of s, with no leading zeros
45 REQUIRED (length >= 1).
46 """
47
48
49 @dataclass(eq=False, repr=False)
50 class Signature(betterproto.Message):
51 sig: bytes = betterproto.bytes_field(1)
52 """
53 Signature itself. (In JSON, this is encoded as base64.)
54 REQUIRED.
55 """
56
57 keyid: str = betterproto.string_field(2)
58 """
59 *Unauthenticated* hint identifying which public key was used.
60 OPTIONAL.
61 """
62
63
64 rebuild_dataclass(Envelope) # type: ignore