go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/common/proto/structmask/structmask.pb.go (about) 1 // Copyright 2021 The LUCI Authors. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // Code generated by protoc-gen-go. DO NOT EDIT. 16 // versions: 17 // protoc-gen-go v1.31.0 18 // protoc v3.21.7 19 // source: go.chromium.org/luci/common/proto/structmask/structmask.proto 20 21 package structmask 22 23 import ( 24 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 25 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 26 reflect "reflect" 27 sync "sync" 28 ) 29 30 const ( 31 // Verify that this generated code is sufficiently up-to-date. 32 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 33 // Verify that runtime/protoimpl is sufficiently up-to-date. 34 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 35 ) 36 37 // StructMask selects a subset of a google.protobuf.Struct. 38 // 39 // Usually used as a repeated field, to allow specifying a union of different 40 // subsets. 41 type StructMask struct { 42 state protoimpl.MessageState 43 sizeCache protoimpl.SizeCache 44 unknownFields protoimpl.UnknownFields 45 46 // A field path inside the struct to select. 47 // 48 // Each item can be: 49 // - `some_value` - a concrete dict key to follow (unless it is a number or 50 // includes `*`, use quotes in this case). 51 // - `"some_value"` - same, but quoted. Useful for selecting `*` or numbers 52 // literally. See https://pkg.go.dev/strconv#Unquote for syntax. 53 // - `<number>` (e.g. `0`) - a zero-based list index to follow. 54 // **Not implemented**. 55 // - `*` - follow all dict keys and all list elements. Applies **only** to 56 // dicts and lists. Trying to recurse into a number or a string results 57 // in an empty match. 58 // 59 // When examining a value the following exceptional conditions result in 60 // an empty match, which is represented by `null` for list elements or 61 // omissions of the field for dicts: 62 // - Trying to follow a dict key while examining a list. 63 // - Trying to follow a key which is not present in the dict. 64 // - Trying to use `*` mask with values that aren't dicts or lists. 65 // 66 // When using `*`, the result is always a subset of the input. In particular 67 // this is important when filtering lists: if a list of size N is selected by 68 // the mask, then the filtered result will also always be a list of size N, 69 // with elements filtered further according to the rest of the mask (perhaps 70 // resulting in `null` elements on type mismatches, as explained above). 71 Path []string `protobuf:"bytes,1,rep,name=path,proto3" json:"path,omitempty"` 72 } 73 74 func (x *StructMask) Reset() { 75 *x = StructMask{} 76 if protoimpl.UnsafeEnabled { 77 mi := &file_go_chromium_org_luci_common_proto_structmask_structmask_proto_msgTypes[0] 78 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 79 ms.StoreMessageInfo(mi) 80 } 81 } 82 83 func (x *StructMask) String() string { 84 return protoimpl.X.MessageStringOf(x) 85 } 86 87 func (*StructMask) ProtoMessage() {} 88 89 func (x *StructMask) ProtoReflect() protoreflect.Message { 90 mi := &file_go_chromium_org_luci_common_proto_structmask_structmask_proto_msgTypes[0] 91 if protoimpl.UnsafeEnabled && x != nil { 92 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 93 if ms.LoadMessageInfo() == nil { 94 ms.StoreMessageInfo(mi) 95 } 96 return ms 97 } 98 return mi.MessageOf(x) 99 } 100 101 // Deprecated: Use StructMask.ProtoReflect.Descriptor instead. 102 func (*StructMask) Descriptor() ([]byte, []int) { 103 return file_go_chromium_org_luci_common_proto_structmask_structmask_proto_rawDescGZIP(), []int{0} 104 } 105 106 func (x *StructMask) GetPath() []string { 107 if x != nil { 108 return x.Path 109 } 110 return nil 111 } 112 113 var File_go_chromium_org_luci_common_proto_structmask_structmask_proto protoreflect.FileDescriptor 114 115 var file_go_chromium_org_luci_common_proto_structmask_structmask_proto_rawDesc = []byte{ 116 0x0a, 0x3d, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 117 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 118 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6d, 0x61, 0x73, 0x6b, 0x2f, 0x73, 119 0x74, 0x72, 0x75, 0x63, 0x74, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 120 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0x20, 0x0a, 0x0a, 0x53, 121 0x74, 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 122 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x2e, 0x5a, 123 0x2c, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 124 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 125 0x74, 0x6f, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6d, 0x61, 0x73, 0x6b, 0x62, 0x06, 0x70, 126 0x72, 0x6f, 0x74, 0x6f, 0x33, 127 } 128 129 var ( 130 file_go_chromium_org_luci_common_proto_structmask_structmask_proto_rawDescOnce sync.Once 131 file_go_chromium_org_luci_common_proto_structmask_structmask_proto_rawDescData = file_go_chromium_org_luci_common_proto_structmask_structmask_proto_rawDesc 132 ) 133 134 func file_go_chromium_org_luci_common_proto_structmask_structmask_proto_rawDescGZIP() []byte { 135 file_go_chromium_org_luci_common_proto_structmask_structmask_proto_rawDescOnce.Do(func() { 136 file_go_chromium_org_luci_common_proto_structmask_structmask_proto_rawDescData = protoimpl.X.CompressGZIP(file_go_chromium_org_luci_common_proto_structmask_structmask_proto_rawDescData) 137 }) 138 return file_go_chromium_org_luci_common_proto_structmask_structmask_proto_rawDescData 139 } 140 141 var file_go_chromium_org_luci_common_proto_structmask_structmask_proto_msgTypes = make([]protoimpl.MessageInfo, 1) 142 var file_go_chromium_org_luci_common_proto_structmask_structmask_proto_goTypes = []interface{}{ 143 (*StructMask)(nil), // 0: structmask.StructMask 144 } 145 var file_go_chromium_org_luci_common_proto_structmask_structmask_proto_depIdxs = []int32{ 146 0, // [0:0] is the sub-list for method output_type 147 0, // [0:0] is the sub-list for method input_type 148 0, // [0:0] is the sub-list for extension type_name 149 0, // [0:0] is the sub-list for extension extendee 150 0, // [0:0] is the sub-list for field type_name 151 } 152 153 func init() { file_go_chromium_org_luci_common_proto_structmask_structmask_proto_init() } 154 func file_go_chromium_org_luci_common_proto_structmask_structmask_proto_init() { 155 if File_go_chromium_org_luci_common_proto_structmask_structmask_proto != nil { 156 return 157 } 158 if !protoimpl.UnsafeEnabled { 159 file_go_chromium_org_luci_common_proto_structmask_structmask_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 160 switch v := v.(*StructMask); i { 161 case 0: 162 return &v.state 163 case 1: 164 return &v.sizeCache 165 case 2: 166 return &v.unknownFields 167 default: 168 return nil 169 } 170 } 171 } 172 type x struct{} 173 out := protoimpl.TypeBuilder{ 174 File: protoimpl.DescBuilder{ 175 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 176 RawDescriptor: file_go_chromium_org_luci_common_proto_structmask_structmask_proto_rawDesc, 177 NumEnums: 0, 178 NumMessages: 1, 179 NumExtensions: 0, 180 NumServices: 0, 181 }, 182 GoTypes: file_go_chromium_org_luci_common_proto_structmask_structmask_proto_goTypes, 183 DependencyIndexes: file_go_chromium_org_luci_common_proto_structmask_structmask_proto_depIdxs, 184 MessageInfos: file_go_chromium_org_luci_common_proto_structmask_structmask_proto_msgTypes, 185 }.Build() 186 File_go_chromium_org_luci_common_proto_structmask_structmask_proto = out.File 187 file_go_chromium_org_luci_common_proto_structmask_structmask_proto_rawDesc = nil 188 file_go_chromium_org_luci_common_proto_structmask_structmask_proto_goTypes = nil 189 file_go_chromium_org_luci_common_proto_structmask_structmask_proto_depIdxs = nil 190 }