Masterarbeit Richard Stern. Flutter App, sich mit einem Bluetooth-Gerät verbindet und Berührungen auf einem Sensor visualisiert.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

field_mask.proto 8.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. // Protocol Buffers - Google's data interchange format
  2. // Copyright 2008 Google Inc. All rights reserved.
  3. // https://developers.google.com/protocol-buffers/
  4. //
  5. // Redistribution and use in source and binary forms, with or without
  6. // modification, are permitted provided that the following conditions are
  7. // met:
  8. //
  9. // * Redistributions of source code must retain the above copyright
  10. // notice, this list of conditions and the following disclaimer.
  11. // * Redistributions in binary form must reproduce the above
  12. // copyright notice, this list of conditions and the following disclaimer
  13. // in the documentation and/or other materials provided with the
  14. // distribution.
  15. // * Neither the name of Google Inc. nor the names of its
  16. // contributors may be used to endorse or promote products derived from
  17. // this software without specific prior written permission.
  18. //
  19. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  20. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  22. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  23. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  24. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  25. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  26. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  27. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  28. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  29. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  30. syntax = "proto3";
  31. package google.protobuf;
  32. option csharp_namespace = "Google.Protobuf.WellKnownTypes";
  33. option java_package = "com.google.protobuf";
  34. option java_outer_classname = "FieldMaskProto";
  35. option java_multiple_files = true;
  36. option objc_class_prefix = "GPB";
  37. option go_package = "google.golang.org/genproto/protobuf/field_mask;field_mask";
  38. // `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. // paths string.
  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 apply 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. // If a repeated field is specified for an update operation, the existing
  107. // repeated values in the target resource will be overwritten by the new values.
  108. // Note that a repeated field is only allowed in the last position of a `paths`
  109. // string.
  110. //
  111. // If a sub-message is specified in the last position of the field mask for an
  112. // update operation, then the existing sub-message in the target resource is
  113. // overwritten. Given the target message:
  114. //
  115. // f {
  116. // b {
  117. // d : 1
  118. // x : 2
  119. // }
  120. // c : 1
  121. // }
  122. //
  123. // And an update message:
  124. //
  125. // f {
  126. // b {
  127. // d : 10
  128. // }
  129. // }
  130. //
  131. // then if the field mask is:
  132. //
  133. // paths: "f.b"
  134. //
  135. // then the result will be:
  136. //
  137. // f {
  138. // b {
  139. // d : 10
  140. // }
  141. // c : 1
  142. // }
  143. //
  144. // However, if the update mask was:
  145. //
  146. // paths: "f.b.d"
  147. //
  148. // then the result would be:
  149. //
  150. // f {
  151. // b {
  152. // d : 10
  153. // x : 2
  154. // }
  155. // c : 1
  156. // }
  157. //
  158. // In order to reset a field's value to the default, the field must
  159. // be in the mask and set to the default value in the provided resource.
  160. // Hence, in order to reset all fields of a resource, provide a default
  161. // instance of the resource and set all fields in the mask, or do
  162. // not provide a mask as described below.
  163. //
  164. // If a field mask is not present on update, the operation applies to
  165. // all fields (as if a field mask of all fields has been specified).
  166. // Note that in the presence of schema evolution, this may mean that
  167. // fields the client does not know and has therefore not filled into
  168. // the request will be reset to their default. If this is unwanted
  169. // behavior, a specific service may require a client to always specify
  170. // a field mask, producing an error if not.
  171. //
  172. // As with get operations, the location of the resource which
  173. // describes the updated values in the request message depends on the
  174. // operation kind. In any case, the effect of the field mask is
  175. // required to be honored by the API.
  176. //
  177. // ## Considerations for HTTP REST
  178. //
  179. // The HTTP kind of an update operation which uses a field mask must
  180. // be set to PATCH instead of PUT in order to satisfy HTTP semantics
  181. // (PUT must only be used for full updates).
  182. //
  183. // # JSON Encoding of Field Masks
  184. //
  185. // In JSON, a field mask is encoded as a single string where paths are
  186. // separated by a comma. Fields name in each path are converted
  187. // to/from lower-camel naming conventions.
  188. //
  189. // As an example, consider the following message declarations:
  190. //
  191. // message Profile {
  192. // User user = 1;
  193. // Photo photo = 2;
  194. // }
  195. // message User {
  196. // string display_name = 1;
  197. // string address = 2;
  198. // }
  199. //
  200. // In proto a field mask for `Profile` may look as such:
  201. //
  202. // mask {
  203. // paths: "user.display_name"
  204. // paths: "photo"
  205. // }
  206. //
  207. // In JSON, the same mask is represented as below:
  208. //
  209. // {
  210. // mask: "user.displayName,photo"
  211. // }
  212. //
  213. // # Field Masks and Oneof Fields
  214. //
  215. // Field masks treat fields in oneofs just as regular fields. Consider the
  216. // following message:
  217. //
  218. // message SampleMessage {
  219. // oneof test_oneof {
  220. // string name = 4;
  221. // SubMessage sub_message = 9;
  222. // }
  223. // }
  224. //
  225. // The field mask can be:
  226. //
  227. // mask {
  228. // paths: "name"
  229. // }
  230. //
  231. // Or:
  232. //
  233. // mask {
  234. // paths: "sub_message"
  235. // }
  236. //
  237. // Note that oneof type names ("test_oneof" in this case) cannot be used in
  238. // paths.
  239. //
  240. // ## Field Mask Verification
  241. //
  242. // The implementation of any API method which has a FieldMask type field in the
  243. // request should verify the included field paths, and return an
  244. // `INVALID_ARGUMENT` error if any path is duplicated or unmappable.
  245. message FieldMask {
  246. // The set of field mask paths.
  247. repeated string paths = 1;
  248. }