go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/analysis/internal/bugs/monorail/api_proto/permission_objects.pb.go (about)

     1  // Copyright 2020 The Chromium Authors
     2  // Use of this source code is governed by a BSD-style license that can be
     3  // found in the LICENSE file.
     4  
     5  // This file defines protobufs for features and related business
     6  // objects, e.g., hotlists.
     7  
     8  // Code generated by protoc-gen-go. DO NOT EDIT.
     9  // versions:
    10  // 	protoc-gen-go v1.31.0
    11  // 	protoc        v3.21.7
    12  // source: go.chromium.org/luci/analysis/internal/bugs/monorail/api_proto/permission_objects.proto
    13  
    14  package api_proto
    15  
    16  import (
    17  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    18  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    19  	reflect "reflect"
    20  	sync "sync"
    21  )
    22  
    23  const (
    24  	// Verify that this generated code is sufficiently up-to-date.
    25  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    26  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    27  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    28  )
    29  
    30  // All possible permissions on the Monorail site.
    31  // Next available tag: 6
    32  type Permission int32
    33  
    34  const (
    35  	// Default value. This value is unused.
    36  	Permission_PERMISSION_UNSPECIFIED Permission = 0
    37  	// The permission needed to add and remove issues from a hotlist.
    38  	Permission_HOTLIST_EDIT Permission = 1
    39  	// The permission needed to delete a hotlist or change hotlist
    40  	// settings/members.
    41  	Permission_HOTLIST_ADMINISTER Permission = 2
    42  	// The permission needed to edit an issue.
    43  	Permission_ISSUE_EDIT Permission = 3
    44  	// The permission needed to edit a custom field definition.
    45  	Permission_FIELD_DEF_EDIT Permission = 4
    46  	// The permission needed to edit the value of a custom field.
    47  	// More permissions will be required in the specific issue
    48  	// where the user plans to edit that value, e.g. ISSUE_EDIT.
    49  	Permission_FIELD_DEF_VALUE_EDIT Permission = 5
    50  )
    51  
    52  // Enum value maps for Permission.
    53  var (
    54  	Permission_name = map[int32]string{
    55  		0: "PERMISSION_UNSPECIFIED",
    56  		1: "HOTLIST_EDIT",
    57  		2: "HOTLIST_ADMINISTER",
    58  		3: "ISSUE_EDIT",
    59  		4: "FIELD_DEF_EDIT",
    60  		5: "FIELD_DEF_VALUE_EDIT",
    61  	}
    62  	Permission_value = map[string]int32{
    63  		"PERMISSION_UNSPECIFIED": 0,
    64  		"HOTLIST_EDIT":           1,
    65  		"HOTLIST_ADMINISTER":     2,
    66  		"ISSUE_EDIT":             3,
    67  		"FIELD_DEF_EDIT":         4,
    68  		"FIELD_DEF_VALUE_EDIT":   5,
    69  	}
    70  )
    71  
    72  func (x Permission) Enum() *Permission {
    73  	p := new(Permission)
    74  	*p = x
    75  	return p
    76  }
    77  
    78  func (x Permission) String() string {
    79  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
    80  }
    81  
    82  func (Permission) Descriptor() protoreflect.EnumDescriptor {
    83  	return file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_enumTypes[0].Descriptor()
    84  }
    85  
    86  func (Permission) Type() protoreflect.EnumType {
    87  	return &file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_enumTypes[0]
    88  }
    89  
    90  func (x Permission) Number() protoreflect.EnumNumber {
    91  	return protoreflect.EnumNumber(x)
    92  }
    93  
    94  // Deprecated: Use Permission.Descriptor instead.
    95  func (Permission) EnumDescriptor() ([]byte, []int) {
    96  	return file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_rawDescGZIP(), []int{0}
    97  }
    98  
    99  // The set of a user's permissions for a single resource.
   100  // Next available tag: 3
   101  type PermissionSet struct {
   102  	state         protoimpl.MessageState
   103  	sizeCache     protoimpl.SizeCache
   104  	unknownFields protoimpl.UnknownFields
   105  
   106  	// The name of the resource `permissions` applies to.
   107  	Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
   108  	// All the permissions a user has for `resource`.
   109  	Permissions []Permission `protobuf:"varint,2,rep,packed,name=permissions,proto3,enum=monorail.v3.Permission" json:"permissions,omitempty"`
   110  }
   111  
   112  func (x *PermissionSet) Reset() {
   113  	*x = PermissionSet{}
   114  	if protoimpl.UnsafeEnabled {
   115  		mi := &file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_msgTypes[0]
   116  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   117  		ms.StoreMessageInfo(mi)
   118  	}
   119  }
   120  
   121  func (x *PermissionSet) String() string {
   122  	return protoimpl.X.MessageStringOf(x)
   123  }
   124  
   125  func (*PermissionSet) ProtoMessage() {}
   126  
   127  func (x *PermissionSet) ProtoReflect() protoreflect.Message {
   128  	mi := &file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_msgTypes[0]
   129  	if protoimpl.UnsafeEnabled && x != nil {
   130  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   131  		if ms.LoadMessageInfo() == nil {
   132  			ms.StoreMessageInfo(mi)
   133  		}
   134  		return ms
   135  	}
   136  	return mi.MessageOf(x)
   137  }
   138  
   139  // Deprecated: Use PermissionSet.ProtoReflect.Descriptor instead.
   140  func (*PermissionSet) Descriptor() ([]byte, []int) {
   141  	return file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_rawDescGZIP(), []int{0}
   142  }
   143  
   144  func (x *PermissionSet) GetResource() string {
   145  	if x != nil {
   146  		return x.Resource
   147  	}
   148  	return ""
   149  }
   150  
   151  func (x *PermissionSet) GetPermissions() []Permission {
   152  	if x != nil {
   153  		return x.Permissions
   154  	}
   155  	return nil
   156  }
   157  
   158  var File_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto protoreflect.FileDescriptor
   159  
   160  var file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_rawDesc = []byte{
   161  	0x0a, 0x57, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72,
   162  	0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x2f,
   163  	0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x62, 0x75, 0x67, 0x73, 0x2f, 0x6d, 0x6f,
   164  	0x6e, 0x6f, 0x72, 0x61, 0x69, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
   165  	0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65,
   166  	0x63, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6d, 0x6f, 0x6e, 0x6f, 0x72,
   167  	0x61, 0x69, 0x6c, 0x2e, 0x76, 0x33, 0x22, 0x66, 0x0a, 0x0d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73,
   168  	0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75,
   169  	0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75,
   170  	0x72, 0x63, 0x65, 0x12, 0x39, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
   171  	0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6d, 0x6f, 0x6e, 0x6f, 0x72,
   172  	0x61, 0x69, 0x6c, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
   173  	0x6e, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0x90,
   174  	0x01, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a,
   175  	0x16, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50,
   176  	0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x48, 0x4f, 0x54,
   177  	0x4c, 0x49, 0x53, 0x54, 0x5f, 0x45, 0x44, 0x49, 0x54, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x48,
   178  	0x4f, 0x54, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x49, 0x53, 0x54, 0x45,
   179  	0x52, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x53, 0x53, 0x55, 0x45, 0x5f, 0x45, 0x44, 0x49,
   180  	0x54, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x44, 0x45, 0x46,
   181  	0x5f, 0x45, 0x44, 0x49, 0x54, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x46, 0x49, 0x45, 0x4c, 0x44,
   182  	0x5f, 0x44, 0x45, 0x46, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x5f, 0x45, 0x44, 0x49, 0x54, 0x10,
   183  	0x05, 0x42, 0x40, 0x5a, 0x3e, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d,
   184  	0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73,
   185  	0x69, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x62, 0x75, 0x67, 0x73,
   186  	0x2f, 0x6d, 0x6f, 0x6e, 0x6f, 0x72, 0x61, 0x69, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x72,
   187  	0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   188  }
   189  
   190  var (
   191  	file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_rawDescOnce sync.Once
   192  	file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_rawDescData = file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_rawDesc
   193  )
   194  
   195  func file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_rawDescGZIP() []byte {
   196  	file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_rawDescOnce.Do(func() {
   197  		file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_rawDescData = protoimpl.X.CompressGZIP(file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_rawDescData)
   198  	})
   199  	return file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_rawDescData
   200  }
   201  
   202  var file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
   203  var file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
   204  var file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_goTypes = []interface{}{
   205  	(Permission)(0),       // 0: monorail.v3.Permission
   206  	(*PermissionSet)(nil), // 1: monorail.v3.PermissionSet
   207  }
   208  var file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_depIdxs = []int32{
   209  	0, // 0: monorail.v3.PermissionSet.permissions:type_name -> monorail.v3.Permission
   210  	1, // [1:1] is the sub-list for method output_type
   211  	1, // [1:1] is the sub-list for method input_type
   212  	1, // [1:1] is the sub-list for extension type_name
   213  	1, // [1:1] is the sub-list for extension extendee
   214  	0, // [0:1] is the sub-list for field type_name
   215  }
   216  
   217  func init() {
   218  	file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_init()
   219  }
   220  func file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_init() {
   221  	if File_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto != nil {
   222  		return
   223  	}
   224  	if !protoimpl.UnsafeEnabled {
   225  		file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   226  			switch v := v.(*PermissionSet); i {
   227  			case 0:
   228  				return &v.state
   229  			case 1:
   230  				return &v.sizeCache
   231  			case 2:
   232  				return &v.unknownFields
   233  			default:
   234  				return nil
   235  			}
   236  		}
   237  	}
   238  	type x struct{}
   239  	out := protoimpl.TypeBuilder{
   240  		File: protoimpl.DescBuilder{
   241  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   242  			RawDescriptor: file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_rawDesc,
   243  			NumEnums:      1,
   244  			NumMessages:   1,
   245  			NumExtensions: 0,
   246  			NumServices:   0,
   247  		},
   248  		GoTypes:           file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_goTypes,
   249  		DependencyIndexes: file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_depIdxs,
   250  		EnumInfos:         file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_enumTypes,
   251  		MessageInfos:      file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_msgTypes,
   252  	}.Build()
   253  	File_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto = out.File
   254  	file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_rawDesc = nil
   255  	file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_goTypes = nil
   256  	file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_depIdxs = nil
   257  }