• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // NO CHECKED-IN PROTOBUF GENCODE
3 // clang-format off
4 // source: google/protobuf/field_mask.proto
5 
6 #import "GPBDescriptor.h"
7 #import "GPBMessage.h"
8 #import "GPBRootObject.h"
9 
10 #if GOOGLE_PROTOBUF_OBJC_VERSION < 30007
11 #error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
12 #endif
13 #if 30007 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
14 #error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
15 #endif
16 
17 // @@protoc_insertion_point(imports)
18 
19 #pragma clang diagnostic push
20 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
21 
22 CF_EXTERN_C_BEGIN
23 
24 NS_ASSUME_NONNULL_BEGIN
25 
26 #pragma mark - GPBFieldMaskRoot
27 
28 /**
29  * Exposes the extension registry for this file.
30  *
31  * The base class provides:
32  * @code
33  *   + (GPBExtensionRegistry *)extensionRegistry;
34  * @endcode
35  * which is a @c GPBExtensionRegistry that includes all the extensions defined by
36  * this file and all files that it depends on.
37  **/
38 GPB_FINAL @interface GPBFieldMaskRoot : GPBRootObject
39 @end
40 
41 #pragma mark - GPBFieldMask
42 
43 typedef GPB_ENUM(GPBFieldMask_FieldNumber) {
44   GPBFieldMask_FieldNumber_PathsArray = 1,
45 };
46 
47 /**
48  * `FieldMask` represents a set of symbolic field paths, for example:
49  *
50  *     paths: "f.a"
51  *     paths: "f.b.d"
52  *
53  * Here `f` represents a field in some root message, `a` and `b`
54  * fields in the message found in `f`, and `d` a field found in the
55  * message in `f.b`.
56  *
57  * Field masks are used to specify a subset of fields that should be
58  * returned by a get operation or modified by an update operation.
59  * Field masks also have a custom JSON encoding (see below).
60  *
61  * # Field Masks in Projections
62  *
63  * When used in the context of a projection, a response message or
64  * sub-message is filtered by the API to only contain those fields as
65  * specified in the mask. For example, if the mask in the previous
66  * example is applied to a response message as follows:
67  *
68  *     f {
69  *       a : 22
70  *       b {
71  *         d : 1
72  *         x : 2
73  *       }
74  *       y : 13
75  *     }
76  *     z: 8
77  *
78  * The result will not contain specific values for fields x,y and z
79  * (their value will be set to the default, and omitted in proto text
80  * output):
81  *
82  *
83  *     f {
84  *       a : 22
85  *       b {
86  *         d : 1
87  *       }
88  *     }
89  *
90  * A repeated field is not allowed except at the last position of a
91  * paths string.
92  *
93  * If a FieldMask object is not present in a get operation, the
94  * operation applies to all fields (as if a FieldMask of all fields
95  * had been specified).
96  *
97  * Note that a field mask does not necessarily apply to the
98  * top-level response message. In case of a REST get operation, the
99  * field mask applies directly to the response, but in case of a REST
100  * list operation, the mask instead applies to each individual message
101  * in the returned resource list. In case of a REST custom method,
102  * other definitions may be used. Where the mask applies will be
103  * clearly documented together with its declaration in the API.  In
104  * any case, the effect on the returned resource/resources is required
105  * behavior for APIs.
106  *
107  * # Field Masks in Update Operations
108  *
109  * A field mask in update operations specifies which fields of the
110  * targeted resource are going to be updated. The API is required
111  * to only change the values of the fields as specified in the mask
112  * and leave the others untouched. If a resource is passed in to
113  * describe the updated values, the API ignores the values of all
114  * fields not covered by the mask.
115  *
116  * If a repeated field is specified for an update operation, new values will
117  * be appended to the existing repeated field in the target resource. Note that
118  * a repeated field is only allowed in the last position of a `paths` string.
119  *
120  * If a sub-message is specified in the last position of the field mask for an
121  * update operation, then new value will be merged into the existing sub-message
122  * in the target resource.
123  *
124  * For example, given the target message:
125  *
126  *     f {
127  *       b {
128  *         d: 1
129  *         x: 2
130  *       }
131  *       c: [1]
132  *     }
133  *
134  * And an update message:
135  *
136  *     f {
137  *       b {
138  *         d: 10
139  *       }
140  *       c: [2]
141  *     }
142  *
143  * then if the field mask is:
144  *
145  *  paths: ["f.b", "f.c"]
146  *
147  * then the result will be:
148  *
149  *     f {
150  *       b {
151  *         d: 10
152  *         x: 2
153  *       }
154  *       c: [1, 2]
155  *     }
156  *
157  * An implementation may provide options to override this default behavior for
158  * repeated and message fields.
159  *
160  * In order to reset a field's value to the default, the field must
161  * be in the mask and set to the default value in the provided resource.
162  * Hence, in order to reset all fields of a resource, provide a default
163  * instance of the resource and set all fields in the mask, or do
164  * not provide a mask as described below.
165  *
166  * If a field mask is not present on update, the operation applies to
167  * all fields (as if a field mask of all fields has been specified).
168  * Note that in the presence of schema evolution, this may mean that
169  * fields the client does not know and has therefore not filled into
170  * the request will be reset to their default. If this is unwanted
171  * behavior, a specific service may require a client to always specify
172  * a field mask, producing an error if not.
173  *
174  * As with get operations, the location of the resource which
175  * describes the updated values in the request message depends on the
176  * operation kind. In any case, the effect of the field mask is
177  * required to be honored by the API.
178  *
179  * ## Considerations for HTTP REST
180  *
181  * The HTTP kind of an update operation which uses a field mask must
182  * be set to PATCH instead of PUT in order to satisfy HTTP semantics
183  * (PUT must only be used for full updates).
184  *
185  * # JSON Encoding of Field Masks
186  *
187  * In JSON, a field mask is encoded as a single string where paths are
188  * separated by a comma. Fields name in each path are converted
189  * to/from lower-camel naming conventions.
190  *
191  * As an example, consider the following message declarations:
192  *
193  *     message Profile {
194  *       User user = 1;
195  *       Photo photo = 2;
196  *     }
197  *     message User {
198  *       string display_name = 1;
199  *       string address = 2;
200  *     }
201  *
202  * In proto a field mask for `Profile` may look as such:
203  *
204  *     mask {
205  *       paths: "user.display_name"
206  *       paths: "photo"
207  *     }
208  *
209  * In JSON, the same mask is represented as below:
210  *
211  *     {
212  *       mask: "user.displayName,photo"
213  *     }
214  *
215  * # Field Masks and Oneof Fields
216  *
217  * Field masks treat fields in oneofs just as regular fields. Consider the
218  * following message:
219  *
220  *     message SampleMessage {
221  *       oneof test_oneof {
222  *         string name = 4;
223  *         SubMessage sub_message = 9;
224  *       }
225  *     }
226  *
227  * The field mask can be:
228  *
229  *     mask {
230  *       paths: "name"
231  *     }
232  *
233  * Or:
234  *
235  *     mask {
236  *       paths: "sub_message"
237  *     }
238  *
239  * Note that oneof type names ("test_oneof" in this case) cannot be used in
240  * paths.
241  *
242  * ## Field Mask Verification
243  *
244  * The implementation of any API method which has a FieldMask type field in the
245  * request should verify the included field paths, and return an
246  * `INVALID_ARGUMENT` error if any path is unmappable.
247  **/
248 GPB_FINAL @interface GPBFieldMask : GPBMessage
249 
250 /** The set of field mask paths. */
251 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *pathsArray;
252 /** The number of items in @c pathsArray without causing the container to be created. */
253 @property(nonatomic, readonly) NSUInteger pathsArray_Count;
254 
255 @end
256 
257 NS_ASSUME_NONNULL_END
258 
259 CF_EXTERN_C_END
260 
261 #pragma clang diagnostic pop
262 
263 // @@protoc_insertion_point(global_scope)
264 
265 // clang-format on
266