massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / protobuf / google / protobuf / any_pb2.pyi
1 """
2 @generated by mypy-protobuf.  Do not edit manually!
3 isort:skip_file
4 """
5 import builtins
6 import google.protobuf.descriptor
7 import google.protobuf.internal.well_known_types
8 import google.protobuf.message
9 import typing
10 import typing_extensions
11
12 DESCRIPTOR: google.protobuf.descriptor.FileDescriptor = ...
13
14 class Any(google.protobuf.message.Message, google.protobuf.internal.well_known_types.Any):
15     """`Any` contains an arbitrary serialized protocol buffer message along with a
16     URL that describes the type of the serialized message.
17
18     Protobuf library provides support to pack/unpack Any values in the form
19     of utility functions or additional generated methods of the Any type.
20
21     Example 1: Pack and unpack a message in C++.
22
23         Foo foo = ...;
24         Any any;
25         any.PackFrom(foo);
26         ...
27         if (any.UnpackTo(&foo)) {
28           ...
29         }
30
31     Example 2: Pack and unpack a message in Java.
32
33         Foo foo = ...;
34         Any any = Any.pack(foo);
35         ...
36         if (any.is(Foo.class)) {
37           foo = any.unpack(Foo.class);
38         }
39
40      Example 3: Pack and unpack a message in Python.
41
42         foo = Foo(...)
43         any = Any()
44         any.Pack(foo)
45         ...
46         if any.Is(Foo.DESCRIPTOR):
47           any.Unpack(foo)
48           ...
49
50      Example 4: Pack and unpack a message in Go
51
52          foo := &pb.Foo{...}
53          any, err := anypb.New(foo)
54          if err != nil {
55            ...
56          }
57          ...
58          foo := &pb.Foo{}
59          if err := any.UnmarshalTo(foo); err != nil {
60            ...
61          }
62
63     The pack methods provided by protobuf library will by default use
64     'type.googleapis.com/full.type.name' as the type URL and the unpack
65     methods only use the fully qualified type name after the last '/'
66     in the type URL, for example "foo.bar.com/x/y.z" will yield type
67     name "y.z".
68
69
70     JSON
71     ====
72     The JSON representation of an `Any` value uses the regular
73     representation of the deserialized, embedded message, with an
74     additional field `@type` which contains the type URL. Example:
75
76         package google.profile;
77         message Person {
78           string first_name = 1;
79           string last_name = 2;
80         }
81
82         {
83           "@type": "type.googleapis.com/google.profile.Person",
84           "firstName": <string>,
85           "lastName": <string>
86         }
87
88     If the embedded message type is well-known and has a custom JSON
89     representation, that representation will be embedded adding a field
90     `value` which holds the custom JSON in addition to the `@type`
91     field. Example (for message [google.protobuf.Duration][]):
92
93         {
94           "@type": "type.googleapis.com/google.protobuf.Duration",
95           "value": "1.212s"
96         }
97     """
98     DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
99     TYPE_URL_FIELD_NUMBER: builtins.int
100     VALUE_FIELD_NUMBER: builtins.int
101     type_url: typing.Text = ...
102     """A URL/resource name that uniquely identifies the type of the serialized
103     protocol buffer message. This string must contain at least
104     one "/" character. The last segment of the URL's path must represent
105     the fully qualified name of the type (as in
106     `path/google.protobuf.Duration`). The name should be in a canonical form
107     (e.g., leading "." is not accepted).
108
109     In practice, teams usually precompile into the binary all types that they
110     expect it to use in the context of Any. However, for URLs which use the
111     scheme `http`, `https`, or no scheme, one can optionally set up a type
112     server that maps type URLs to message definitions as follows:
113
114     * If no scheme is provided, `https` is assumed.
115     * An HTTP GET on the URL must yield a [google.protobuf.Type][]
116       value in binary format, or produce an error.
117     * Applications are allowed to cache lookup results based on the
118       URL, or have them precompiled into a binary to avoid any
119       lookup. Therefore, binary compatibility needs to be preserved
120       on changes to types. (Use versioned type names to manage
121       breaking changes.)
122
123     Note: this functionality is not currently available in the official
124     protobuf release, and it is not used for type URLs beginning with
125     type.googleapis.com.
126
127     Schemes other than `http`, `https` (or the empty scheme) might be
128     used with implementation specific semantics.
129     """
130
131     value: builtins.bytes = ...
132     """Must be a valid serialized protocol buffer of the above specified type."""
133
134     def __init__(self,
135         *,
136         type_url : typing.Text = ...,
137         value : builtins.bytes = ...,
138         ) -> None: ...
139     def ClearField(self, field_name: typing_extensions.Literal["type_url",b"type_url","value",b"value"]) -> None: ...
140 global___Any = Any