| // Copyright 2022 The LUCI Authors. |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| // Code generated by protoc-gen-go. DO NOT EDIT. |
| // versions: |
| // protoc-gen-go v1.36.9 |
| // protoc v6.32.0 |
| // source: go.chromium.org/luci/buildbucket/proto/build_field_visibility.proto |
| |
| package buildbucketpb |
| |
| import ( |
| protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| descriptorpb "google.golang.org/protobuf/types/descriptorpb" |
| reflect "reflect" |
| sync "sync" |
| unsafe "unsafe" |
| ) |
| |
| const ( |
| // Verify that this generated code is sufficiently up-to-date. |
| _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
| // Verify that runtime/protoimpl is sufficiently up-to-date. |
| _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
| ) |
| |
| // Can be used to indicate that a buildbucket.v2.Build field should be visible |
| // to users with the specified permission. By default, buildbucket.builds.get |
| // is required to see fields, but this enum allows that access to be expanded. |
| // |
| // Note that we assume that users with GET_LIMITED also have LIST, and users |
| // with GET also have GET_LIMITED and LIST. |
| // |
| // IMPORTANT: this enum must be ordered such that permissions that grant more |
| // access (e.g. BUILDS_GET_PERMISSION) must always have lower enum numbers than |
| // permissions that grant less access (e.g. BUILDS_LIST_PERMISSION). |
| type BuildFieldVisibility int32 |
| |
| const ( |
| // No visibility specified. In this case the visibility defaults to |
| // requiring the buildbucket.builds.get permission. |
| BuildFieldVisibility_FIELD_VISIBILITY_UNSPECIFIED BuildFieldVisibility = 0 |
| // Indicates the field will only be visible to users with the |
| // buildbucket.builds.get permission. |
| BuildFieldVisibility_BUILDS_GET_PERMISSION BuildFieldVisibility = 1 |
| // Indicates the field will be visible to users with either the |
| // buildbucket.builds.getLimited or buildbucket.builds.get permission. |
| BuildFieldVisibility_BUILDS_GET_LIMITED_PERMISSION BuildFieldVisibility = 2 |
| // Indicates the field will be visible to users with either the |
| // buildbucket.builds.list, buildbucket.builds.getLimited or |
| // buildbucket.builds.get permission. |
| BuildFieldVisibility_BUILDS_LIST_PERMISSION BuildFieldVisibility = 3 |
| ) |
| |
| // Enum value maps for BuildFieldVisibility. |
| var ( |
| BuildFieldVisibility_name = map[int32]string{ |
| 0: "FIELD_VISIBILITY_UNSPECIFIED", |
| 1: "BUILDS_GET_PERMISSION", |
| 2: "BUILDS_GET_LIMITED_PERMISSION", |
| 3: "BUILDS_LIST_PERMISSION", |
| } |
| BuildFieldVisibility_value = map[string]int32{ |
| "FIELD_VISIBILITY_UNSPECIFIED": 0, |
| "BUILDS_GET_PERMISSION": 1, |
| "BUILDS_GET_LIMITED_PERMISSION": 2, |
| "BUILDS_LIST_PERMISSION": 3, |
| } |
| ) |
| |
| func (x BuildFieldVisibility) Enum() *BuildFieldVisibility { |
| p := new(BuildFieldVisibility) |
| *p = x |
| return p |
| } |
| |
| func (x BuildFieldVisibility) String() string { |
| return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
| } |
| |
| func (BuildFieldVisibility) Descriptor() protoreflect.EnumDescriptor { |
| return file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_enumTypes[0].Descriptor() |
| } |
| |
| func (BuildFieldVisibility) Type() protoreflect.EnumType { |
| return &file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_enumTypes[0] |
| } |
| |
| func (x BuildFieldVisibility) Number() protoreflect.EnumNumber { |
| return protoreflect.EnumNumber(x) |
| } |
| |
| // Deprecated: Use BuildFieldVisibility.Descriptor instead. |
| func (BuildFieldVisibility) EnumDescriptor() ([]byte, []int) { |
| return file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDescGZIP(), []int{0} |
| } |
| |
| var file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_extTypes = []protoimpl.ExtensionInfo{ |
| { |
| ExtendedType: (*descriptorpb.FieldOptions)(nil), |
| ExtensionType: (*BuildFieldVisibility)(nil), |
| Field: 910567, |
| Name: "buildbucket.v2.visible_with", |
| Tag: "varint,910567,opt,name=visible_with,enum=buildbucket.v2.BuildFieldVisibility", |
| Filename: "go.chromium.org/luci/buildbucket/proto/build_field_visibility.proto", |
| }, |
| } |
| |
| // Extension fields to descriptorpb.FieldOptions. |
| var ( |
| // Can be used to indicate that a buildbucket.v2.Build field should be visible |
| // to users with the specified permission. By default, buildbucket.builds.get |
| // is required to see fields, but this annotation allows that access to be |
| // expanded. |
| // |
| // Note that we assume that users with GET_LIMITED also have LIST, and users |
| // with GET also have GET_LIMITED and LIST. |
| // |
| // optional buildbucket.v2.BuildFieldVisibility visible_with = 910567; |
| E_VisibleWith = &file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_extTypes[0] |
| ) |
| |
| var File_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto protoreflect.FileDescriptor |
| |
| const file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDesc = "" + |
| "\n" + |
| "Cgo.chromium.org/luci/buildbucket/proto/build_field_visibility.proto\x12\x0ebuildbucket.v2\x1a google/protobuf/descriptor.proto*\x92\x01\n" + |
| "\x14BuildFieldVisibility\x12 \n" + |
| "\x1cFIELD_VISIBILITY_UNSPECIFIED\x10\x00\x12\x19\n" + |
| "\x15BUILDS_GET_PERMISSION\x10\x01\x12!\n" + |
| "\x1dBUILDS_GET_LIMITED_PERMISSION\x10\x02\x12\x1a\n" + |
| "\x16BUILDS_LIST_PERMISSION\x10\x03:h\n" + |
| "\fvisible_with\x12\x1d.google.protobuf.FieldOptions\x18\xe7\xc97 \x01(\x0e2$.buildbucket.v2.BuildFieldVisibilityR\vvisibleWithB6Z4go.chromium.org/luci/buildbucket/proto;buildbucketpbb\x06proto3" |
| |
| var ( |
| file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDescOnce sync.Once |
| file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDescData []byte |
| ) |
| |
| func file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDescGZIP() []byte { |
| file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDescOnce.Do(func() { |
| file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDesc), len(file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDesc))) |
| }) |
| return file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDescData |
| } |
| |
| var file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_enumTypes = make([]protoimpl.EnumInfo, 1) |
| var file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_goTypes = []any{ |
| (BuildFieldVisibility)(0), // 0: buildbucket.v2.BuildFieldVisibility |
| (*descriptorpb.FieldOptions)(nil), // 1: google.protobuf.FieldOptions |
| } |
| var file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_depIdxs = []int32{ |
| 1, // 0: buildbucket.v2.visible_with:extendee -> google.protobuf.FieldOptions |
| 0, // 1: buildbucket.v2.visible_with:type_name -> buildbucket.v2.BuildFieldVisibility |
| 2, // [2:2] is the sub-list for method output_type |
| 2, // [2:2] is the sub-list for method input_type |
| 1, // [1:2] is the sub-list for extension type_name |
| 0, // [0:1] is the sub-list for extension extendee |
| 0, // [0:0] is the sub-list for field type_name |
| } |
| |
| func init() { file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_init() } |
| func file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_init() { |
| if File_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto != nil { |
| return |
| } |
| type x struct{} |
| out := protoimpl.TypeBuilder{ |
| File: protoimpl.DescBuilder{ |
| GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| RawDescriptor: unsafe.Slice(unsafe.StringData(file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDesc), len(file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_rawDesc)), |
| NumEnums: 1, |
| NumMessages: 0, |
| NumExtensions: 1, |
| NumServices: 0, |
| }, |
| GoTypes: file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_goTypes, |
| DependencyIndexes: file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_depIdxs, |
| EnumInfos: file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_enumTypes, |
| ExtensionInfos: file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_extTypes, |
| }.Build() |
| File_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto = out.File |
| file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_goTypes = nil |
| file_go_chromium_org_luci_buildbucket_proto_build_field_visibility_proto_depIdxs = nil |
| } |