FieldMask.pbobjc.h 6.3 KB

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