go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/buildbucket/proto/build_field_visibility.pb.go (about) 1 // Copyright 2022 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.32.0 18 // protoc v3.21.7 19 // source: go.chromium.org/luci/buildbucket/proto/build_field_visibility.proto 20 21 package buildbucketpb 22 23 import ( 24 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 25 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 26 descriptorpb "google.golang.org/protobuf/types/descriptorpb" 27 reflect "reflect" 28 sync "sync" 29 ) 30 31 const ( 32 // Verify that this generated code is sufficiently up-to-date. 33 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 34 // Verify that runtime/protoimpl is sufficiently up-to-date. 35 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 36 ) 37 38 // Can be used to indicate that a buildbucket.v2.Build field should be visible 39 // to users with the specified permission. By default, buildbucket.builds.get 40 // is required to see fields, but this enum allows that access to be expanded. 41 // 42 // Note that we assume that users with GET_LIMITED also have LIST, and users 43 // with GET also have GET_LIMITED and LIST. 44 // 45 // IMPORTANT: this enum must be ordered such that permissions that grant more 46 // access (e.g. BUILDS_GET_PERMISSION) must always have lower enum numbers than 47 // permissions that grant less access (e.g. BUILDS_LIST_PERMISSION). 48 type BuildFieldVisibility int32 49 50 const ( 51 // No visibility specified. In this case the visibility defaults to 52 // requiring the buildbucket.builds.get permission. 53 BuildFieldVisibility_FIELD_VISIBILITY_UNSPECIFIED BuildFieldVisibility = 0 54 // Indicates the field will only be visible to users with the 55 // buildbucket.builds.get permission. 56 BuildFieldVisibility_BUILDS_GET_PERMISSION BuildFieldVisibility = 1 57 // Indicates the field will be visible to users with either the 58 // buildbucket.builds.getLimited or buildbucket.builds.get permission. 59 BuildFieldVisibility_BUILDS_GET_LIMITED_PERMISSION BuildFieldVisibility = 2 60 // Indicates the field will be visible to users with either the 61 // buildbucket.builds.list, buildbucket.builds.getLimited or 62 // buildbucket.builds.get permission. 63 BuildFieldVisibility_BUILDS_LIST_PERMISSION BuildFieldVisibility = 3 64 ) 65 66 // Enum value maps for BuildFieldVisibility. 67 var ( 68 BuildFieldVisibility_name = map[int32]string{ 69 0: "FIELD_VISIBILITY_UNSPECIFIED", 70 1: "BUILDS_GET_PERMISSION", 71 2: "BUILDS_GET_LIMITED_PERMISSION", 72 3: "BUILDS_LIST_PERMISSION", 73 } 74 BuildFieldVisibility_value = map[string]int32{ 75 "FIELD_VISIBILITY_UNSPECIFIED": 0, 76 "BUILDS_GET_PERMISSION": 1, 77 "BUILDS_GET_LIMITED_PERMISSION": 2, 78 "BUILDS_LIST_PERMISSION": 3, 79 } 80 ) 81 82 func (x BuildFieldVisibility) Enum() *BuildFieldVisibility { 83 p := new(BuildFieldVisibility) 84 *p = x 85 return p 86 } 87 88 func (x BuildFieldVisibility) String() string { 89 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) 90 } 91 92 func (BuildFieldVisibility) Descriptor() protoreflect.EnumDescriptor { 93 return file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_enumTypes[0].Descriptor() 94 } 95 96 func (BuildFieldVisibility) Type() protoreflect.EnumType { 97 return &file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_enumTypes[0] 98 } 99 100 func (x BuildFieldVisibility) Number() protoreflect.EnumNumber { 101 return protoreflect.EnumNumber(x) 102 } 103 104 // Deprecated: Use BuildFieldVisibility.Descriptor instead. 105 func (BuildFieldVisibility) EnumDescriptor() ([]byte, []int) { 106 return file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDescGZIP(), []int{0} 107 } 108 109 var file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_extTypes = []protoimpl.ExtensionInfo{ 110 { 111 ExtendedType: (*descriptorpb.FieldOptions)(nil), 112 ExtensionType: (*BuildFieldVisibility)(nil), 113 Field: 910567, 114 Name: "buildbucket.v2.visible_with", 115 Tag: "varint,910567,opt,name=visible_with,enum=buildbucket.v2.BuildFieldVisibility", 116 Filename: "go.chromium.org/luci/buildbucket/proto/build_field_visibility.proto", 117 }, 118 } 119 120 // Extension fields to descriptorpb.FieldOptions. 121 var ( 122 // Can be used to indicate that a buildbucket.v2.Build field should be visible 123 // to users with the specified permission. By default, buildbucket.builds.get 124 // is required to see fields, but this annotation allows that access to be 125 // expanded. 126 // 127 // Note that we assume that users with GET_LIMITED also have LIST, and users 128 // with GET also have GET_LIMITED and LIST. 129 // 130 // optional buildbucket.v2.BuildFieldVisibility visible_with = 910567; 131 E_VisibleWith = &file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_extTypes[0] 132 ) 133 134 var File_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto protoreflect.FileDescriptor 135 136 var file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDesc = []byte{ 137 0x0a, 0x43, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 138 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x62, 0x75, 0x63, 0x6b, 139 0x65, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x66, 140 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 141 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x62, 0x75, 0x63, 0x6b, 142 0x65, 0x74, 0x2e, 0x76, 0x32, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 143 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 144 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a, 0x92, 0x01, 0x0a, 0x14, 0x42, 0x75, 0x69, 0x6c, 145 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 146 0x12, 0x20, 0x0a, 0x1c, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 147 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 148 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x53, 0x5f, 0x47, 0x45, 0x54, 149 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x21, 0x0a, 150 0x1d, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x53, 0x5f, 0x47, 0x45, 0x54, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 151 0x54, 0x45, 0x44, 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02, 152 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x53, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x5f, 153 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x3a, 0x68, 0x0a, 0x0c, 154 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x12, 0x1d, 0x2e, 0x67, 155 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 156 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xe7, 0xc9, 0x37, 0x20, 157 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x62, 0x75, 0x63, 0x6b, 0x65, 158 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x56, 159 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0b, 0x76, 0x69, 0x73, 0x69, 0x62, 160 0x6c, 0x65, 0x57, 0x69, 0x74, 0x68, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 161 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x62, 162 0x75, 0x69, 0x6c, 0x64, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 163 0x3b, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x70, 0x62, 0x62, 0x06, 164 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 165 } 166 167 var ( 168 file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDescOnce sync.Once 169 file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDescData = file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDesc 170 ) 171 172 func file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDescGZIP() []byte { 173 file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDescOnce.Do(func() { 174 file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDescData = protoimpl.X.CompressGZIP(file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDescData) 175 }) 176 return file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDescData 177 } 178 179 var file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_enumTypes = make([]protoimpl.EnumInfo, 1) 180 var file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_goTypes = []interface{}{ 181 (BuildFieldVisibility)(0), // 0: buildbucket.v2.BuildFieldVisibility 182 (*descriptorpb.FieldOptions)(nil), // 1: google.protobuf.FieldOptions 183 } 184 var file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_depIdxs = []int32{ 185 1, // 0: buildbucket.v2.visible_with:extendee -> google.protobuf.FieldOptions 186 0, // 1: buildbucket.v2.visible_with:type_name -> buildbucket.v2.BuildFieldVisibility 187 2, // [2:2] is the sub-list for method output_type 188 2, // [2:2] is the sub-list for method input_type 189 1, // [1:2] is the sub-list for extension type_name 190 0, // [0:1] is the sub-list for extension extendee 191 0, // [0:0] is the sub-list for field type_name 192 } 193 194 func init() { file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_init() } 195 func file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_init() { 196 if File_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto != nil { 197 return 198 } 199 type x struct{} 200 out := protoimpl.TypeBuilder{ 201 File: protoimpl.DescBuilder{ 202 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 203 RawDescriptor: file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDesc, 204 NumEnums: 1, 205 NumMessages: 0, 206 NumExtensions: 1, 207 NumServices: 0, 208 }, 209 GoTypes: file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_goTypes, 210 DependencyIndexes: file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_depIdxs, 211 EnumInfos: file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_enumTypes, 212 ExtensionInfos: file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_extTypes, 213 }.Build() 214 File_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto = out.File 215 file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDesc = nil 216 file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_goTypes = nil 217 file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_depIdxs = nil 218 }