1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // NO CHECKED-IN PROTOBUF GENCODE
4 // source: google/protobuf/field_mask.proto
6 #import "GPBDescriptor.h"
8 #import "GPBRootObject.h"
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.
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.
17 // @@protoc_insertion_point(imports)
19 #pragma clang diagnostic push
20 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
24 NS_ASSUME_NONNULL_BEGIN
26 #pragma mark - GPBFieldMaskRoot
29 * Exposes the extension registry for this file.
31 * The base class provides:
33 * + (GPBExtensionRegistry *)extensionRegistry;
35 * which is a @c GPBExtensionRegistry that includes all the extensions defined by
36 * this file and all files that it depends on.
38 GPB_FINAL @interface GPBFieldMaskRoot
: GPBRootObject
41 #pragma mark - GPBFieldMask
43 typedef GPB_ENUM(GPBFieldMask_FieldNumber
) {
44 GPBFieldMask_FieldNumber_PathsArray
= 1,
48 * `FieldMask` represents a set of symbolic field paths, for example:
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
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).
61 * # Field Masks in Projections
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:
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
90 * A repeated field is not allowed except at the last position of a
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).
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
107 * # Field Masks in Update Operations
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.
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.
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.
124 * For example, given the target message:
134 * And an update message:
143 * then if the field mask is:
145 * paths: ["f.b", "f.c"]
147 * then the result will be:
157 * An implementation may provide options to override this default behavior for
158 * repeated and message fields.
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.
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.
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.
179 * ## Considerations for HTTP REST
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).
185 * # JSON Encoding of Field Masks
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.
191 * As an example, consider the following message declarations:
198 * string display_name = 1;
199 * string address = 2;
202 * In proto a field mask for `Profile` may look as such:
205 * paths: "user.display_name"
209 * In JSON, the same mask is represented as below:
212 * mask: "user.displayName,photo"
215 * # Field Masks and Oneof Fields
217 * Field masks treat fields in oneofs just as regular fields. Consider the
220 * message SampleMessage {
223 * SubMessage sub_message = 9;
227 * The field mask can be:
236 * paths: "sub_message"
239 * Note that oneof type names ("test_oneof" in this case) cannot be used in
242 * ## Field Mask Verification
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.
248 GPB_FINAL @interface GPBFieldMask
: GPBMessage
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
;
257 NS_ASSUME_NONNULL_END
261 #pragma clang diagnostic pop
263 // @@protoc_insertion_point(global_scope)