massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / protobuf / google / protobuf / field_mask_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.containers
8 import google.protobuf.internal.well_known_types
9 import google.protobuf.message
10 import typing
11 import typing_extensions
12
13 DESCRIPTOR: google.protobuf.descriptor.FileDescriptor = ...
14
15 class FieldMask(google.protobuf.message.Message, google.protobuf.internal.well_known_types.FieldMask):
16     """`FieldMask` represents a set of symbolic field paths, for example:
17
18         paths: "f.a"
19         paths: "f.b.d"
20
21     Here `f` represents a field in some root message, `a` and `b`
22     fields in the message found in `f`, and `d` a field found in the
23     message in `f.b`.
24
25     Field masks are used to specify a subset of fields that should be
26     returned by a get operation or modified by an update operation.
27     Field masks also have a custom JSON encoding (see below).
28
29     # Field Masks in Projections
30
31     When used in the context of a projection, a response message or
32     sub-message is filtered by the API to only contain those fields as
33     specified in the mask. For example, if the mask in the previous
34     example is applied to a response message as follows:
35
36         f {
37           a : 22
38           b {
39             d : 1
40             x : 2
41           }
42           y : 13
43         }
44         z: 8
45
46     The result will not contain specific values for fields x,y and z
47     (their value will be set to the default, and omitted in proto text
48     output):
49
50
51         f {
52           a : 22
53           b {
54             d : 1
55           }
56         }
57
58     A repeated field is not allowed except at the last position of a
59     paths string.
60
61     If a FieldMask object is not present in a get operation, the
62     operation applies to all fields (as if a FieldMask of all fields
63     had been specified).
64
65     Note that a field mask does not necessarily apply to the
66     top-level response message. In case of a REST get operation, the
67     field mask applies directly to the response, but in case of a REST
68     list operation, the mask instead applies to each individual message
69     in the returned resource list. In case of a REST custom method,
70     other definitions may be used. Where the mask applies will be
71     clearly documented together with its declaration in the API.  In
72     any case, the effect on the returned resource/resources is required
73     behavior for APIs.
74
75     # Field Masks in Update Operations
76
77     A field mask in update operations specifies which fields of the
78     targeted resource are going to be updated. The API is required
79     to only change the values of the fields as specified in the mask
80     and leave the others untouched. If a resource is passed in to
81     describe the updated values, the API ignores the values of all
82     fields not covered by the mask.
83
84     If a repeated field is specified for an update operation, new values will
85     be appended to the existing repeated field in the target resource. Note that
86     a repeated field is only allowed in the last position of a `paths` string.
87
88     If a sub-message is specified in the last position of the field mask for an
89     update operation, then new value will be merged into the existing sub-message
90     in the target resource.
91
92     For example, given the target message:
93
94         f {
95           b {
96             d: 1
97             x: 2
98           }
99           c: [1]
100         }
101
102     And an update message:
103
104         f {
105           b {
106             d: 10
107           }
108           c: [2]
109         }
110
111     then if the field mask is:
112
113      paths: ["f.b", "f.c"]
114
115     then the result will be:
116
117         f {
118           b {
119             d: 10
120             x: 2
121           }
122           c: [1, 2]
123         }
124
125     An implementation may provide options to override this default behavior for
126     repeated and message fields.
127
128     In order to reset a field's value to the default, the field must
129     be in the mask and set to the default value in the provided resource.
130     Hence, in order to reset all fields of a resource, provide a default
131     instance of the resource and set all fields in the mask, or do
132     not provide a mask as described below.
133
134     If a field mask is not present on update, the operation applies to
135     all fields (as if a field mask of all fields has been specified).
136     Note that in the presence of schema evolution, this may mean that
137     fields the client does not know and has therefore not filled into
138     the request will be reset to their default. If this is unwanted
139     behavior, a specific service may require a client to always specify
140     a field mask, producing an error if not.
141
142     As with get operations, the location of the resource which
143     describes the updated values in the request message depends on the
144     operation kind. In any case, the effect of the field mask is
145     required to be honored by the API.
146
147     ## Considerations for HTTP REST
148
149     The HTTP kind of an update operation which uses a field mask must
150     be set to PATCH instead of PUT in order to satisfy HTTP semantics
151     (PUT must only be used for full updates).
152
153     # JSON Encoding of Field Masks
154
155     In JSON, a field mask is encoded as a single string where paths are
156     separated by a comma. Fields name in each path are converted
157     to/from lower-camel naming conventions.
158
159     As an example, consider the following message declarations:
160
161         message Profile {
162           User user = 1;
163           Photo photo = 2;
164         }
165         message User {
166           string display_name = 1;
167           string address = 2;
168         }
169
170     In proto a field mask for `Profile` may look as such:
171
172         mask {
173           paths: "user.display_name"
174           paths: "photo"
175         }
176
177     In JSON, the same mask is represented as below:
178
179         {
180           mask: "user.displayName,photo"
181         }
182
183     # Field Masks and Oneof Fields
184
185     Field masks treat fields in oneofs just as regular fields. Consider the
186     following message:
187
188         message SampleMessage {
189           oneof test_oneof {
190             string name = 4;
191             SubMessage sub_message = 9;
192           }
193         }
194
195     The field mask can be:
196
197         mask {
198           paths: "name"
199         }
200
201     Or:
202
203         mask {
204           paths: "sub_message"
205         }
206
207     Note that oneof type names ("test_oneof" in this case) cannot be used in
208     paths.
209
210     ## Field Mask Verification
211
212     The implementation of any API method which has a FieldMask type field in the
213     request should verify the included field paths, and return an
214     `INVALID_ARGUMENT` error if any path is unmappable.
215     """
216     DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
217     PATHS_FIELD_NUMBER: builtins.int
218     @property
219     def paths(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]:
220         """The set of field mask paths."""
221         pass
222     def __init__(self,
223         *,
224         paths : typing.Optional[typing.Iterable[typing.Text]] = ...,
225         ) -> None: ...
226     def ClearField(self, field_name: typing_extensions.Literal["paths",b"paths"]) -> None: ...
227 global___FieldMask = FieldMask