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