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