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.
 
 
 

281 lines
9.2 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/protobuf/field_mask.proto
  3. package field_mask // import "google.golang.org/genproto/protobuf/field_mask"
  4. import proto "github.com/golang/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. // Reference imports to suppress errors if they are not otherwise used.
  8. var _ = proto.Marshal
  9. var _ = fmt.Errorf
  10. var _ = math.Inf
  11. // This is a compile-time assertion to ensure that this generated file
  12. // is compatible with the proto package it is being compiled against.
  13. // A compilation error at this line likely means your copy of the
  14. // proto package needs to be updated.
  15. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  16. // `FieldMask` represents a set of symbolic field paths, for example:
  17. //
  18. // paths: "f.a"
  19. // paths: "f.b.d"
  20. //
  21. // Here `f` represents a field in some root message, `a` and `b`
  22. // fields in the message found in `f`, and `d` a field found in the
  23. // message in `f.b`.
  24. //
  25. // Field masks are used to specify a subset of fields that should be
  26. // returned by a get operation or modified by an update operation.
  27. // Field masks also have a custom JSON encoding (see below).
  28. //
  29. // # Field Masks in Projections
  30. //
  31. // When used in the context of a projection, a response message or
  32. // sub-message is filtered by the API to only contain those fields as
  33. // specified in the mask. For example, if the mask in the previous
  34. // example is applied to a response message as follows:
  35. //
  36. // f {
  37. // a : 22
  38. // b {
  39. // d : 1
  40. // x : 2
  41. // }
  42. // y : 13
  43. // }
  44. // z: 8
  45. //
  46. // The result will not contain specific values for fields x,y and z
  47. // (their value will be set to the default, and omitted in proto text
  48. // output):
  49. //
  50. //
  51. // f {
  52. // a : 22
  53. // b {
  54. // d : 1
  55. // }
  56. // }
  57. //
  58. // A repeated field is not allowed except at the last position of a
  59. // paths string.
  60. //
  61. // If a FieldMask object is not present in a get operation, the
  62. // operation applies to all fields (as if a FieldMask of all fields
  63. // had been specified).
  64. //
  65. // Note that a field mask does not necessarily apply to the
  66. // top-level response message. In case of a REST get operation, the
  67. // field mask applies directly to the response, but in case of a REST
  68. // list operation, the mask instead applies to each individual message
  69. // in the returned resource list. In case of a REST custom method,
  70. // other definitions may be used. Where the mask applies will be
  71. // clearly documented together with its declaration in the API. In
  72. // any case, the effect on the returned resource/resources is required
  73. // behavior for APIs.
  74. //
  75. // # Field Masks in Update Operations
  76. //
  77. // A field mask in update operations specifies which fields of the
  78. // targeted resource are going to be updated. The API is required
  79. // to only change the values of the fields as specified in the mask
  80. // and leave the others untouched. If a resource is passed in to
  81. // describe the updated values, the API ignores the values of all
  82. // fields not covered by the mask.
  83. //
  84. // If a repeated field is specified for an update operation, new values will
  85. // be appended to the existing repeated field in the target resource. Note that
  86. // a repeated field is only allowed in the last position of a `paths` string.
  87. //
  88. // If a sub-message is specified in the last position of the field mask for an
  89. // update operation, then new value will be merged into the existing sub-message
  90. // in the target resource.
  91. //
  92. // For example, given the target message:
  93. //
  94. // f {
  95. // b {
  96. // d: 1
  97. // x: 2
  98. // }
  99. // c: [1]
  100. // }
  101. //
  102. // And an update message:
  103. //
  104. // f {
  105. // b {
  106. // d: 10
  107. // }
  108. // c: [2]
  109. // }
  110. //
  111. // then if the field mask is:
  112. //
  113. // paths: ["f.b", "f.c"]
  114. //
  115. // then the result will be:
  116. //
  117. // f {
  118. // b {
  119. // d: 10
  120. // x: 2
  121. // }
  122. // c: [1, 2]
  123. // }
  124. //
  125. // An implementation may provide options to override this default behavior for
  126. // repeated and message fields.
  127. //
  128. // In order to reset a field's value to the default, the field must
  129. // be in the mask and set to the default value in the provided resource.
  130. // Hence, in order to reset all fields of a resource, provide a default
  131. // instance of the resource and set all fields in the mask, or do
  132. // not provide a mask as described below.
  133. //
  134. // If a field mask is not present on update, the operation applies to
  135. // all fields (as if a field mask of all fields has been specified).
  136. // Note that in the presence of schema evolution, this may mean that
  137. // fields the client does not know and has therefore not filled into
  138. // the request will be reset to their default. If this is unwanted
  139. // behavior, a specific service may require a client to always specify
  140. // a field mask, producing an error if not.
  141. //
  142. // As with get operations, the location of the resource which
  143. // describes the updated values in the request message depends on the
  144. // operation kind. In any case, the effect of the field mask is
  145. // required to be honored by the API.
  146. //
  147. // ## Considerations for HTTP REST
  148. //
  149. // The HTTP kind of an update operation which uses a field mask must
  150. // be set to PATCH instead of PUT in order to satisfy HTTP semantics
  151. // (PUT must only be used for full updates).
  152. //
  153. // # JSON Encoding of Field Masks
  154. //
  155. // In JSON, a field mask is encoded as a single string where paths are
  156. // separated by a comma. Fields name in each path are converted
  157. // to/from lower-camel naming conventions.
  158. //
  159. // As an example, consider the following message declarations:
  160. //
  161. // message Profile {
  162. // User user = 1;
  163. // Photo photo = 2;
  164. // }
  165. // message User {
  166. // string display_name = 1;
  167. // string address = 2;
  168. // }
  169. //
  170. // In proto a field mask for `Profile` may look as such:
  171. //
  172. // mask {
  173. // paths: "user.display_name"
  174. // paths: "photo"
  175. // }
  176. //
  177. // In JSON, the same mask is represented as below:
  178. //
  179. // {
  180. // mask: "user.displayName,photo"
  181. // }
  182. //
  183. // # Field Masks and Oneof Fields
  184. //
  185. // Field masks treat fields in oneofs just as regular fields. Consider the
  186. // following message:
  187. //
  188. // message SampleMessage {
  189. // oneof test_oneof {
  190. // string name = 4;
  191. // SubMessage sub_message = 9;
  192. // }
  193. // }
  194. //
  195. // The field mask can be:
  196. //
  197. // mask {
  198. // paths: "name"
  199. // }
  200. //
  201. // Or:
  202. //
  203. // mask {
  204. // paths: "sub_message"
  205. // }
  206. //
  207. // Note that oneof type names ("test_oneof" in this case) cannot be used in
  208. // paths.
  209. //
  210. // ## Field Mask Verification
  211. //
  212. // The implementation of any API method which has a FieldMask type field in the
  213. // request should verify the included field paths, and return an
  214. // `INVALID_ARGUMENT` error if any path is duplicated or unmappable.
  215. type FieldMask struct {
  216. // The set of field mask paths.
  217. Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"`
  218. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  219. XXX_unrecognized []byte `json:"-"`
  220. XXX_sizecache int32 `json:"-"`
  221. }
  222. func (m *FieldMask) Reset() { *m = FieldMask{} }
  223. func (m *FieldMask) String() string { return proto.CompactTextString(m) }
  224. func (*FieldMask) ProtoMessage() {}
  225. func (*FieldMask) Descriptor() ([]byte, []int) {
  226. return fileDescriptor_field_mask_02a8b0c0831edcce, []int{0}
  227. }
  228. func (m *FieldMask) XXX_Unmarshal(b []byte) error {
  229. return xxx_messageInfo_FieldMask.Unmarshal(m, b)
  230. }
  231. func (m *FieldMask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  232. return xxx_messageInfo_FieldMask.Marshal(b, m, deterministic)
  233. }
  234. func (dst *FieldMask) XXX_Merge(src proto.Message) {
  235. xxx_messageInfo_FieldMask.Merge(dst, src)
  236. }
  237. func (m *FieldMask) XXX_Size() int {
  238. return xxx_messageInfo_FieldMask.Size(m)
  239. }
  240. func (m *FieldMask) XXX_DiscardUnknown() {
  241. xxx_messageInfo_FieldMask.DiscardUnknown(m)
  242. }
  243. var xxx_messageInfo_FieldMask proto.InternalMessageInfo
  244. func (m *FieldMask) GetPaths() []string {
  245. if m != nil {
  246. return m.Paths
  247. }
  248. return nil
  249. }
  250. func init() {
  251. proto.RegisterType((*FieldMask)(nil), "google.protobuf.FieldMask")
  252. }
  253. func init() {
  254. proto.RegisterFile("google/protobuf/field_mask.proto", fileDescriptor_field_mask_02a8b0c0831edcce)
  255. }
  256. var fileDescriptor_field_mask_02a8b0c0831edcce = []byte{
  257. // 175 bytes of a gzipped FileDescriptorProto
  258. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xcf, 0xcf, 0x4f,
  259. 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcb, 0x4c, 0xcd,
  260. 0x49, 0x89, 0xcf, 0x4d, 0x2c, 0xce, 0xd6, 0x03, 0x8b, 0x09, 0xf1, 0x43, 0x54, 0xe8, 0xc1, 0x54,
  261. 0x28, 0x29, 0x72, 0x71, 0xba, 0x81, 0x14, 0xf9, 0x26, 0x16, 0x67, 0x0b, 0x89, 0x70, 0xb1, 0x16,
  262. 0x24, 0x96, 0x64, 0x14, 0x4b, 0x30, 0x2a, 0x30, 0x6b, 0x70, 0x06, 0x41, 0x38, 0x4e, 0x3d, 0x8c,
  263. 0x5c, 0xc2, 0xc9, 0xf9, 0xb9, 0x7a, 0x68, 0x5a, 0x9d, 0xf8, 0xe0, 0x1a, 0x03, 0x40, 0x42, 0x01,
  264. 0x8c, 0x51, 0x96, 0x50, 0x25, 0xe9, 0xf9, 0x39, 0x89, 0x79, 0xe9, 0x7a, 0xf9, 0x45, 0xe9, 0xfa,
  265. 0xe9, 0xa9, 0x79, 0x60, 0x0d, 0xd8, 0xdc, 0x64, 0x8d, 0x60, 0xfe, 0x60, 0x64, 0x5c, 0xc4, 0xc4,
  266. 0xec, 0x1e, 0xe0, 0xb4, 0x8a, 0x49, 0xce, 0x1d, 0x62, 0x48, 0x00, 0x54, 0x83, 0x5e, 0x78, 0x6a,
  267. 0x4e, 0x8e, 0x77, 0x5e, 0x7e, 0x79, 0x5e, 0x48, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0xd8, 0x24,
  268. 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfd, 0xda, 0xb7, 0xa8, 0xed, 0x00, 0x00, 0x00,
  269. }