blob: 47a239ba56eb77f61569219f9eaa779693a4a71d [file] [log] [blame]
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -04001// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: google/protobuf/field_mask.proto
3
4#import "GPBProtocolBuffers.h"
5
Thomas Van Lenten79a23c42016-03-17 10:04:21 -04006#if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30001
Thomas Van Lenten536059e2015-12-02 14:43:05 -05007#error This file was generated by a different version of protoc which is incompatible with your Protocol Buffer library sources.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -04008#endif
9
10// @@protoc_insertion_point(imports)
11
Thomas Van Lentene664aa62016-04-19 13:13:04 -040012#pragma clang diagnostic push
13#pragma clang diagnostic ignored "-Wdeprecated-declarations"
14
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040015CF_EXTERN_C_BEGIN
16
Thomas Van Lenten8c889572015-06-16 16:45:14 -040017NS_ASSUME_NONNULL_BEGIN
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040018
19#pragma mark - GPBFieldMaskRoot
20
Thomas Van Lenten36650a02016-03-07 12:07:03 -050021/// Exposes the extension registry for this file.
22///
23/// The base class provides:
24/// @code
25/// + (GPBExtensionRegistry *)extensionRegistry;
26/// @endcode
27/// which is a @c GPBExtensionRegistry that includes all the extensions defined by
28/// this file and all files that it depends on.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040029@interface GPBFieldMaskRoot : GPBRootObject
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040030@end
31
32#pragma mark - GPBFieldMask
33
34typedef GPB_ENUM(GPBFieldMask_FieldNumber) {
35 GPBFieldMask_FieldNumber_PathsArray = 1,
36};
37
Thomas Van Lenten36650a02016-03-07 12:07:03 -050038/// `FieldMask` represents a set of symbolic field paths, for example:
39///
40/// paths: "f.a"
41/// paths: "f.b.d"
42///
43/// Here `f` represents a field in some root message, `a` and `b`
44/// fields in the message found in `f`, and `d` a field found in the
45/// message in `f.b`.
46///
47/// Field masks are used to specify a subset of fields that should be
48/// returned by a get operation or modified by an update operation.
49/// Field masks also have a custom JSON encoding (see below).
50///
51/// # Field Masks in Projections
52///
53/// When used in the context of a projection, a response message or
54/// sub-message is filtered by the API to only contain those fields as
55/// specified in the mask. For example, if the mask in the previous
56/// example is applied to a response message as follows:
57///
58/// f {
59/// a : 22
60/// b {
61/// d : 1
62/// x : 2
63/// }
64/// y : 13
65/// }
66/// z: 8
67///
68/// The result will not contain specific values for fields x,y and z
69/// (their value will be set to the default, and omitted in proto text
70/// output):
71///
72///
73/// f {
74/// a : 22
75/// b {
76/// d : 1
77/// }
78/// }
79///
80/// A repeated field is not allowed except at the last position of a
81/// field mask.
82///
83/// If a FieldMask object is not present in a get operation, the
84/// operation applies to all fields (as if a FieldMask of all fields
85/// had been specified).
86///
87/// Note that a field mask does not necessarily applies to the
88/// top-level response message. In case of a REST get operation, the
89/// field mask applies directly to the response, but in case of a REST
90/// list operation, the mask instead applies to each individual message
91/// in the returned resource list. In case of a REST custom method,
92/// other definitions may be used. Where the mask applies will be
93/// clearly documented together with its declaration in the API. In
94/// any case, the effect on the returned resource/resources is required
95/// behavior for APIs.
96///
97/// # Field Masks in Update Operations
98///
99/// A field mask in update operations specifies which fields of the
100/// targeted resource are going to be updated. The API is required
101/// to only change the values of the fields as specified in the mask
102/// and leave the others untouched. If a resource is passed in to
103/// describe the updated values, the API ignores the values of all
104/// fields not covered by the mask.
105///
106/// In order to reset a field's value to the default, the field must
107/// be in the mask and set to the default value in the provided resource.
108/// Hence, in order to reset all fields of a resource, provide a default
109/// instance of the resource and set all fields in the mask, or do
110/// not provide a mask as described below.
111///
112/// If a field mask is not present on update, the operation applies to
113/// all fields (as if a field mask of all fields has been specified).
114/// Note that in the presence of schema evolution, this may mean that
115/// fields the client does not know and has therefore not filled into
116/// the request will be reset to their default. If this is unwanted
117/// behavior, a specific service may require a client to always specify
118/// a field mask, producing an error if not.
119///
120/// As with get operations, the location of the resource which
121/// describes the updated values in the request message depends on the
122/// operation kind. In any case, the effect of the field mask is
123/// required to be honored by the API.
124///
125/// ## Considerations for HTTP REST
126///
127/// The HTTP kind of an update operation which uses a field mask must
128/// be set to PATCH instead of PUT in order to satisfy HTTP semantics
129/// (PUT must only be used for full updates).
130///
131/// # JSON Encoding of Field Masks
132///
133/// In JSON, a field mask is encoded as a single string where paths are
134/// separated by a comma. Fields name in each path are converted
135/// to/from lower-camel naming conventions.
136///
137/// As an example, consider the following message declarations:
138///
139/// message Profile {
140/// User user = 1;
141/// Photo photo = 2;
142/// }
143/// message User {
144/// string display_name = 1;
145/// string address = 2;
146/// }
147///
148/// In proto a field mask for `Profile` may look as such:
149///
150/// mask {
151/// paths: "user.display_name"
152/// paths: "photo"
153/// }
154///
155/// In JSON, the same mask is represented as below:
156///
157/// {
158/// mask: "user.displayName,photo"
159/// }
Thomas Van Lentene664aa62016-04-19 13:13:04 -0400160///
161/// # Field Masks and Oneof Fields
162///
163/// Field masks treat fields in oneofs just as regular fields. Consider the
164/// following message:
165///
166/// message SampleMessage {
167/// oneof test_oneof {
168/// string name = 4;
169/// SubMessage sub_message = 9;
170/// }
171/// }
172///
173/// The field mask can be:
174///
175/// mask {
176/// paths: "name"
177/// }
178///
179/// Or:
180///
181/// mask {
182/// paths: "sub_message"
183/// }
184///
185/// Note that oneof type names ("test_oneof" in this case) cannot be used in
186/// paths.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400187@interface GPBFieldMask : GPBMessage
188
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500189/// The set of field mask paths.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -0500190@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *pathsArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500191/// The number of items in @c pathsArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400192@property(nonatomic, readonly) NSUInteger pathsArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400193
194@end
195
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400196NS_ASSUME_NONNULL_END
197
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400198CF_EXTERN_C_END
199
Thomas Van Lentene664aa62016-04-19 13:13:04 -0400200#pragma clang diagnostic pop
201
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400202// @@protoc_insertion_point(global_scope)