blob: dbeee7f9c2a11ff027fa4a87838fbd6eae57e010 [file] [log] [blame]
Joe Tsai19058432019-02-27 21:46:29 -08001// Code generated by protoc-gen-go. DO NOT EDIT.
2// source: google/protobuf/field_mask.proto
3
4package known_proto
5
6import (
Joe Tsai19058432019-02-27 21:46:29 -08007 protoreflect "github.com/golang/protobuf/v2/reflect/protoreflect"
Joe Tsai35ec98f2019-03-25 14:41:32 -07008 protoregistry "github.com/golang/protobuf/v2/reflect/protoregistry"
Joe Tsai19058432019-02-27 21:46:29 -08009 protoimpl "github.com/golang/protobuf/v2/runtime/protoimpl"
Joe Tsai5d72cc22019-03-28 01:13:26 -070010 sync "sync"
Joe Tsai19058432019-02-27 21:46:29 -080011)
12
Joe Tsai5d72cc22019-03-28 01:13:26 -070013const _ = protoimpl.EnforceVersion(protoimpl.Version - 0)
14
Joe Tsai19058432019-02-27 21:46:29 -080015// `FieldMask` represents a set of symbolic field paths, for example:
16//
17// paths: "f.a"
18// paths: "f.b.d"
19//
20// Here `f` represents a field in some root message, `a` and `b`
21// fields in the message found in `f`, and `d` a field found in the
22// message in `f.b`.
23//
24// Field masks are used to specify a subset of fields that should be
25// returned by a get operation or modified by an update operation.
26// Field masks also have a custom JSON encoding (see below).
27//
28// # Field Masks in Projections
29//
30// When used in the context of a projection, a response message or
31// sub-message is filtered by the API to only contain those fields as
32// specified in the mask. For example, if the mask in the previous
33// example is applied to a response message as follows:
34//
35// f {
36// a : 22
37// b {
38// d : 1
39// x : 2
40// }
41// y : 13
42// }
43// z: 8
44//
45// The result will not contain specific values for fields x,y and z
46// (their value will be set to the default, and omitted in proto text
47// output):
48//
49//
50// f {
51// a : 22
52// b {
53// d : 1
54// }
55// }
56//
57// A repeated field is not allowed except at the last position of a
58// paths string.
59//
60// If a FieldMask object is not present in a get operation, the
61// operation applies to all fields (as if a FieldMask of all fields
62// had been specified).
63//
64// Note that a field mask does not necessarily apply to the
65// top-level response message. In case of a REST get operation, the
66// field mask applies directly to the response, but in case of a REST
67// list operation, the mask instead applies to each individual message
68// in the returned resource list. In case of a REST custom method,
69// other definitions may be used. Where the mask applies will be
70// clearly documented together with its declaration in the API. In
71// any case, the effect on the returned resource/resources is required
72// behavior for APIs.
73//
74// # Field Masks in Update Operations
75//
76// A field mask in update operations specifies which fields of the
77// targeted resource are going to be updated. The API is required
78// to only change the values of the fields as specified in the mask
79// and leave the others untouched. If a resource is passed in to
80// describe the updated values, the API ignores the values of all
81// fields not covered by the mask.
82//
Joe Tsaibb786ea2019-03-11 22:53:48 -070083// If a repeated field is specified for an update operation, new values will
84// be appended to the existing repeated field in the target resource. Note that
85// a repeated field is only allowed in the last position of a `paths` string.
Joe Tsai19058432019-02-27 21:46:29 -080086//
87// If a sub-message is specified in the last position of the field mask for an
Joe Tsaibb786ea2019-03-11 22:53:48 -070088// update operation, then new value will be merged into the existing sub-message
89// in the target resource.
90//
91// For example, given the target message:
Joe Tsai19058432019-02-27 21:46:29 -080092//
93// f {
94// b {
Joe Tsaibb786ea2019-03-11 22:53:48 -070095// d: 1
96// x: 2
Joe Tsai19058432019-02-27 21:46:29 -080097// }
Joe Tsaibb786ea2019-03-11 22:53:48 -070098// c: [1]
Joe Tsai19058432019-02-27 21:46:29 -080099// }
100//
101// And an update message:
102//
103// f {
104// b {
Joe Tsaibb786ea2019-03-11 22:53:48 -0700105// d: 10
Joe Tsai19058432019-02-27 21:46:29 -0800106// }
Joe Tsaibb786ea2019-03-11 22:53:48 -0700107// c: [2]
Joe Tsai19058432019-02-27 21:46:29 -0800108// }
109//
110// then if the field mask is:
111//
Joe Tsaibb786ea2019-03-11 22:53:48 -0700112// paths: ["f.b", "f.c"]
Joe Tsai19058432019-02-27 21:46:29 -0800113//
114// then the result will be:
115//
116// f {
117// b {
Joe Tsaibb786ea2019-03-11 22:53:48 -0700118// d: 10
119// x: 2
Joe Tsai19058432019-02-27 21:46:29 -0800120// }
Joe Tsaibb786ea2019-03-11 22:53:48 -0700121// c: [1, 2]
Joe Tsai19058432019-02-27 21:46:29 -0800122// }
123//
Joe Tsaibb786ea2019-03-11 22:53:48 -0700124// An implementation may provide options to override this default behavior for
125// repeated and message fields.
Joe Tsai19058432019-02-27 21:46:29 -0800126//
127// In order to reset a field's value to the default, the field must
128// be in the mask and set to the default value in the provided resource.
129// Hence, in order to reset all fields of a resource, provide a default
130// instance of the resource and set all fields in the mask, or do
131// not provide a mask as described below.
132//
133// If a field mask is not present on update, the operation applies to
134// all fields (as if a field mask of all fields has been specified).
135// Note that in the presence of schema evolution, this may mean that
136// fields the client does not know and has therefore not filled into
137// the request will be reset to their default. If this is unwanted
138// behavior, a specific service may require a client to always specify
139// a field mask, producing an error if not.
140//
141// As with get operations, the location of the resource which
142// describes the updated values in the request message depends on the
143// operation kind. In any case, the effect of the field mask is
144// required to be honored by the API.
145//
146// ## Considerations for HTTP REST
147//
148// The HTTP kind of an update operation which uses a field mask must
149// be set to PATCH instead of PUT in order to satisfy HTTP semantics
150// (PUT must only be used for full updates).
151//
152// # JSON Encoding of Field Masks
153//
154// In JSON, a field mask is encoded as a single string where paths are
155// separated by a comma. Fields name in each path are converted
156// to/from lower-camel naming conventions.
157//
158// As an example, consider the following message declarations:
159//
160// message Profile {
161// User user = 1;
162// Photo photo = 2;
163// }
164// message User {
165// string display_name = 1;
166// string address = 2;
167// }
168//
169// In proto a field mask for `Profile` may look as such:
170//
171// mask {
172// paths: "user.display_name"
173// paths: "photo"
174// }
175//
176// In JSON, the same mask is represented as below:
177//
178// {
179// mask: "user.displayName,photo"
180// }
181//
182// # Field Masks and Oneof Fields
183//
184// Field masks treat fields in oneofs just as regular fields. Consider the
185// following message:
186//
187// message SampleMessage {
188// oneof test_oneof {
189// string name = 4;
190// SubMessage sub_message = 9;
191// }
192// }
193//
194// The field mask can be:
195//
196// mask {
197// paths: "name"
198// }
199//
200// Or:
201//
202// mask {
203// paths: "sub_message"
204// }
205//
206// Note that oneof type names ("test_oneof" in this case) cannot be used in
207// paths.
208//
209// ## Field Mask Verification
210//
211// The implementation of any API method which has a FieldMask type field in the
212// request should verify the included field paths, and return an
213// `INVALID_ARGUMENT` error if any path is duplicated or unmappable.
214type FieldMask struct {
215 // The set of field mask paths.
216 Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"`
217 XXX_NoUnkeyedLiteral struct{} `json:"-"`
218 XXX_unrecognized []byte `json:"-"`
219 XXX_sizecache int32 `json:"-"`
220}
221
Joe Tsai61968ce2019-04-01 12:59:24 -0700222func (x *FieldMask) Reset() {
223 *x = FieldMask{}
Joe Tsai19058432019-02-27 21:46:29 -0800224}
Joe Tsai61968ce2019-04-01 12:59:24 -0700225
226func (x *FieldMask) String() string {
227 return protoimpl.X.MessageStringOf(x)
228}
229
230func (*FieldMask) ProtoMessage() {}
231
232func (x *FieldMask) ProtoReflect() protoreflect.Message {
233 return xxx_File_google_protobuf_field_mask_proto_messageTypes[0].MessageOf(x)
234}
Joe Tsai8e506a82019-03-16 00:05:34 -0700235
236// Deprecated: Use FieldMask.ProtoReflect.Type instead.
Joe Tsai19058432019-02-27 21:46:29 -0800237func (*FieldMask) Descriptor() ([]byte, []int) {
Joe Tsai5d72cc22019-03-28 01:13:26 -0700238 return xxx_File_google_protobuf_field_mask_proto_rawDescGZIP(), []int{0}
Joe Tsai19058432019-02-27 21:46:29 -0800239}
240
Joe Tsai61968ce2019-04-01 12:59:24 -0700241func (x *FieldMask) GetPaths() []string {
242 if x != nil {
243 return x.Paths
Joe Tsai19058432019-02-27 21:46:29 -0800244 }
245 return nil
246}
247
Joe Tsai5d72cc22019-03-28 01:13:26 -0700248var File_google_protobuf_field_mask_proto protoreflect.FileDescriptor
249
250var xxx_File_google_protobuf_field_mask_proto_rawDesc = []byte{
Joe Tsai19058432019-02-27 21:46:29 -0800251 0x0a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
252 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f,
253 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
254 0x62, 0x75, 0x66, 0x22, 0x21, 0x0a, 0x09, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b,
255 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52,
Joe Tsaibb786ea2019-03-11 22:53:48 -0700256 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x42, 0x88, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67,
Joe Tsai19058432019-02-27 21:46:29 -0800257 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x0e,
258 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
259 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c,
260 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x32, 0x2f,
261 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x3b, 0x6b, 0x6e, 0x6f, 0x77,
Joe Tsaibb786ea2019-03-11 22:53:48 -0700262 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42,
263 0xaa, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62,
264 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65,
265 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
Joe Tsai19058432019-02-27 21:46:29 -0800266}
267
Joe Tsai5d72cc22019-03-28 01:13:26 -0700268var (
269 xxx_File_google_protobuf_field_mask_proto_rawDesc_once sync.Once
270 xxx_File_google_protobuf_field_mask_proto_rawDesc_data = xxx_File_google_protobuf_field_mask_proto_rawDesc
271)
Joe Tsai19058432019-02-27 21:46:29 -0800272
Joe Tsai5d72cc22019-03-28 01:13:26 -0700273func xxx_File_google_protobuf_field_mask_proto_rawDescGZIP() []byte {
274 xxx_File_google_protobuf_field_mask_proto_rawDesc_once.Do(func() {
275 xxx_File_google_protobuf_field_mask_proto_rawDesc_data = protoimpl.X.CompressGZIP(xxx_File_google_protobuf_field_mask_proto_rawDesc_data)
276 })
277 return xxx_File_google_protobuf_field_mask_proto_rawDesc_data
278}
Joe Tsai19058432019-02-27 21:46:29 -0800279
Damien Neil6bb8dec2019-03-01 13:22:30 -0800280var xxx_File_google_protobuf_field_mask_proto_messageTypes = make([]protoimpl.MessageType, 1)
Joe Tsai19058432019-02-27 21:46:29 -0800281var xxx_File_google_protobuf_field_mask_proto_goTypes = []interface{}{
282 (*FieldMask)(nil), // 0: google.protobuf.FieldMask
283}
284var xxx_File_google_protobuf_field_mask_proto_depIdxs = []int32{}
285
Damien Neil0fc22452019-03-08 17:18:11 -0800286func init() { xxx_File_google_protobuf_field_mask_proto_init() }
287func xxx_File_google_protobuf_field_mask_proto_init() {
288 if File_google_protobuf_field_mask_proto != nil {
289 return
290 }
Joe Tsai19058432019-02-27 21:46:29 -0800291 File_google_protobuf_field_mask_proto = protoimpl.FileBuilder{
Joe Tsai5d72cc22019-03-28 01:13:26 -0700292 RawDescriptor: xxx_File_google_protobuf_field_mask_proto_rawDesc,
Joe Tsai19058432019-02-27 21:46:29 -0800293 GoTypes: xxx_File_google_protobuf_field_mask_proto_goTypes,
294 DependencyIndexes: xxx_File_google_protobuf_field_mask_proto_depIdxs,
Joe Tsai35ec98f2019-03-25 14:41:32 -0700295 MessageOutputTypes: xxx_File_google_protobuf_field_mask_proto_messageTypes,
296 FilesRegistry: protoregistry.GlobalFiles,
297 TypesRegistry: protoregistry.GlobalTypes,
Joe Tsai19058432019-02-27 21:46:29 -0800298 }.Init()
Joe Tsai5d72cc22019-03-28 01:13:26 -0700299 xxx_File_google_protobuf_field_mask_proto_rawDesc = nil
Joe Tsai19058432019-02-27 21:46:29 -0800300 xxx_File_google_protobuf_field_mask_proto_goTypes = nil
301 xxx_File_google_protobuf_field_mask_proto_depIdxs = nil
302}