1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/field_mask.proto
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
10 #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
11 #import <Protobuf/GPBDescriptor.h>
12 #import <Protobuf/GPBMessage.h>
13 #import <Protobuf/GPBRootObject.h>
15 #import "GPBDescriptor.h"
16 #import "GPBMessage.h"
17 #import "GPBRootObject.h"
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.
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.
27 // @@protoc_insertion_point(imports)
29 #pragma clang diagnostic push
30 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
34 NS_ASSUME_NONNULL_BEGIN
36 #pragma mark - GPBFieldMaskRoot
39 * Exposes the extension registry for this file.
41 * The base class provides:
43 * + (GPBExtensionRegistry *)extensionRegistry;
45 * which is a @c GPBExtensionRegistry that includes all the extensions defined by
46 * this file and all files that it depends on.
48 @interface GPBFieldMaskRoot : GPBRootObject
51 #pragma mark - GPBFieldMask
53 typedef GPB_ENUM(GPBFieldMask_FieldNumber) {
54 GPBFieldMask_FieldNumber_PathsArray = 1,
58 * `FieldMask` represents a set of symbolic field paths, for example:
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
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).
71 * # Field Masks in Projections
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:
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
100 * A repeated field is not allowed except at the last position of a
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).
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
117 * # Field Masks in Update Operations
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.
126 * If a repeated field is specified for an update operation, the existing
127 * repeated values in the target resource will be overwritten by the new values.
128 * Note that a repeated field is only allowed in the last position of a `paths`
131 * If a sub-message is specified in the last position of the field mask for an
132 * update operation, then the existing sub-message in the target resource is
133 * overwritten. Given the target message:
143 * And an update message:
151 * then if the field mask is:
155 * then the result will be:
164 * However, if the update mask was:
168 * then the result would be:
178 * In order to reset a field's value to the default, the field must
179 * be in the mask and set to the default value in the provided resource.
180 * Hence, in order to reset all fields of a resource, provide a default
181 * instance of the resource and set all fields in the mask, or do
182 * not provide a mask as described below.
184 * If a field mask is not present on update, the operation applies to
185 * all fields (as if a field mask of all fields has been specified).
186 * Note that in the presence of schema evolution, this may mean that
187 * fields the client does not know and has therefore not filled into
188 * the request will be reset to their default. If this is unwanted
189 * behavior, a specific service may require a client to always specify
190 * a field mask, producing an error if not.
192 * As with get operations, the location of the resource which
193 * describes the updated values in the request message depends on the
194 * operation kind. In any case, the effect of the field mask is
195 * required to be honored by the API.
197 * ## Considerations for HTTP REST
199 * The HTTP kind of an update operation which uses a field mask must
200 * be set to PATCH instead of PUT in order to satisfy HTTP semantics
201 * (PUT must only be used for full updates).
203 * # JSON Encoding of Field Masks
205 * In JSON, a field mask is encoded as a single string where paths are
206 * separated by a comma. Fields name in each path are converted
207 * to/from lower-camel naming conventions.
209 * As an example, consider the following message declarations:
216 * string display_name = 1;
217 * string address = 2;
220 * In proto a field mask for `Profile` may look as such:
223 * paths: "user.display_name"
227 * In JSON, the same mask is represented as below:
230 * mask: "user.displayName,photo"
233 * # Field Masks and Oneof Fields
235 * Field masks treat fields in oneofs just as regular fields. Consider the
238 * message SampleMessage {
241 * SubMessage sub_message = 9;
245 * The field mask can be:
254 * paths: "sub_message"
257 * Note that oneof type names ("test_oneof" in this case) cannot be used in
260 * ## Field Mask Verification
262 * The implementation of any API method which has a FieldMask type field in the
263 * request should verify the included field paths, and return an
264 * `INVALID_ARGUMENT` error if any path is duplicated or unmappable.
266 @interface GPBFieldMask : GPBMessage
268 /** The set of field mask paths. */
269 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *pathsArray;
270 /** The number of items in @c pathsArray without causing the array to be created. */
271 @property(nonatomic, readonly) NSUInteger pathsArray_Count;
275 NS_ASSUME_NONNULL_END
279 #pragma clang diagnostic pop
281 // @@protoc_insertion_point(global_scope)