FieldMask.pbobjc.h 7.4 KB

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