go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/teams/proto/v1/teams.pb.go (about)

     1  // Copyright 2024 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/teams/proto/v1/teams.proto
    20  
    21  package v1
    22  
    23  import prpc "go.chromium.org/luci/grpc/prpc"
    24  
    25  import (
    26  	context "context"
    27  	_ "google.golang.org/genproto/googleapis/api/annotations"
    28  	grpc "google.golang.org/grpc"
    29  	codes "google.golang.org/grpc/codes"
    30  	status "google.golang.org/grpc/status"
    31  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    32  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    33  	timestamppb "google.golang.org/protobuf/types/known/timestamppb"
    34  	reflect "reflect"
    35  	sync "sync"
    36  )
    37  
    38  const (
    39  	// Verify that this generated code is sufficiently up-to-date.
    40  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    41  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    42  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    43  )
    44  
    45  type GetTeamRequest struct {
    46  	state         protoimpl.MessageState
    47  	sizeCache     protoimpl.SizeCache
    48  	unknownFields protoimpl.UnknownFields
    49  
    50  	// The resource name of the team to get.
    51  	//
    52  	// You can use 'my' as the id to get the team for the current user
    53  	// i.e. set the name to 'teams/my'.
    54  	//
    55  	// Format: teams/{id}
    56  	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    57  }
    58  
    59  func (x *GetTeamRequest) Reset() {
    60  	*x = GetTeamRequest{}
    61  	if protoimpl.UnsafeEnabled {
    62  		mi := &file_go_chromium_org_luci_teams_proto_v1_teams_proto_msgTypes[0]
    63  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    64  		ms.StoreMessageInfo(mi)
    65  	}
    66  }
    67  
    68  func (x *GetTeamRequest) String() string {
    69  	return protoimpl.X.MessageStringOf(x)
    70  }
    71  
    72  func (*GetTeamRequest) ProtoMessage() {}
    73  
    74  func (x *GetTeamRequest) ProtoReflect() protoreflect.Message {
    75  	mi := &file_go_chromium_org_luci_teams_proto_v1_teams_proto_msgTypes[0]
    76  	if protoimpl.UnsafeEnabled && x != nil {
    77  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    78  		if ms.LoadMessageInfo() == nil {
    79  			ms.StoreMessageInfo(mi)
    80  		}
    81  		return ms
    82  	}
    83  	return mi.MessageOf(x)
    84  }
    85  
    86  // Deprecated: Use GetTeamRequest.ProtoReflect.Descriptor instead.
    87  func (*GetTeamRequest) Descriptor() ([]byte, []int) {
    88  	return file_go_chromium_org_luci_teams_proto_v1_teams_proto_rawDescGZIP(), []int{0}
    89  }
    90  
    91  func (x *GetTeamRequest) GetName() string {
    92  	if x != nil {
    93  		return x.Name
    94  	}
    95  	return ""
    96  }
    97  
    98  // Represents a team resource.
    99  type Team struct {
   100  	state         protoimpl.MessageState
   101  	sizeCache     protoimpl.SizeCache
   102  	unknownFields protoimpl.UnknownFields
   103  
   104  	// The name of this team.
   105  	// Format: team/{id}
   106  	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
   107  	// The time the team was made.
   108  	CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
   109  }
   110  
   111  func (x *Team) Reset() {
   112  	*x = Team{}
   113  	if protoimpl.UnsafeEnabled {
   114  		mi := &file_go_chromium_org_luci_teams_proto_v1_teams_proto_msgTypes[1]
   115  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   116  		ms.StoreMessageInfo(mi)
   117  	}
   118  }
   119  
   120  func (x *Team) String() string {
   121  	return protoimpl.X.MessageStringOf(x)
   122  }
   123  
   124  func (*Team) ProtoMessage() {}
   125  
   126  func (x *Team) ProtoReflect() protoreflect.Message {
   127  	mi := &file_go_chromium_org_luci_teams_proto_v1_teams_proto_msgTypes[1]
   128  	if protoimpl.UnsafeEnabled && x != nil {
   129  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   130  		if ms.LoadMessageInfo() == nil {
   131  			ms.StoreMessageInfo(mi)
   132  		}
   133  		return ms
   134  	}
   135  	return mi.MessageOf(x)
   136  }
   137  
   138  // Deprecated: Use Team.ProtoReflect.Descriptor instead.
   139  func (*Team) Descriptor() ([]byte, []int) {
   140  	return file_go_chromium_org_luci_teams_proto_v1_teams_proto_rawDescGZIP(), []int{1}
   141  }
   142  
   143  func (x *Team) GetName() string {
   144  	if x != nil {
   145  		return x.Name
   146  	}
   147  	return ""
   148  }
   149  
   150  func (x *Team) GetCreateTime() *timestamppb.Timestamp {
   151  	if x != nil {
   152  		return x.CreateTime
   153  	}
   154  	return nil
   155  }
   156  
   157  var File_go_chromium_org_luci_teams_proto_v1_teams_proto protoreflect.FileDescriptor
   158  
   159  var file_go_chromium_org_luci_teams_proto_v1_teams_proto_rawDesc = []byte{
   160  	0x0a, 0x2f, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72,
   161  	0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x70, 0x72, 0x6f,
   162  	0x74, 0x6f, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
   163  	0x6f, 0x12, 0x0d, 0x6c, 0x75, 0x63, 0x69, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31,
   164  	0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65,
   165  	0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
   166  	0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
   167  	0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f,
   168  	0x74, 0x6f, 0x22, 0x24, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71,
   169  	0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
   170  	0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x64, 0x0a, 0x04, 0x54, 0x65, 0x61, 0x6d,
   171  	0x12, 0x1a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06,
   172  	0xe0, 0x41, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b,
   173  	0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
   174  	0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
   175  	0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0,
   176  	0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x32, 0x44,
   177  	0x0a, 0x05, 0x54, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x3b, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x1d,
   178  	0x2e, 0x6c, 0x75, 0x63, 0x69, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47,
   179  	0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e,
   180  	0x6c, 0x75, 0x63, 0x69, 0x2e, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65,
   181  	0x61, 0x6d, 0x22, 0x00, 0x42, 0x25, 0x5a, 0x23, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d,
   182  	0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x74, 0x65, 0x61,
   183  	0x6d, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
   184  	0x74, 0x6f, 0x33,
   185  }
   186  
   187  var (
   188  	file_go_chromium_org_luci_teams_proto_v1_teams_proto_rawDescOnce sync.Once
   189  	file_go_chromium_org_luci_teams_proto_v1_teams_proto_rawDescData = file_go_chromium_org_luci_teams_proto_v1_teams_proto_rawDesc
   190  )
   191  
   192  func file_go_chromium_org_luci_teams_proto_v1_teams_proto_rawDescGZIP() []byte {
   193  	file_go_chromium_org_luci_teams_proto_v1_teams_proto_rawDescOnce.Do(func() {
   194  		file_go_chromium_org_luci_teams_proto_v1_teams_proto_rawDescData = protoimpl.X.CompressGZIP(file_go_chromium_org_luci_teams_proto_v1_teams_proto_rawDescData)
   195  	})
   196  	return file_go_chromium_org_luci_teams_proto_v1_teams_proto_rawDescData
   197  }
   198  
   199  var file_go_chromium_org_luci_teams_proto_v1_teams_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
   200  var file_go_chromium_org_luci_teams_proto_v1_teams_proto_goTypes = []interface{}{
   201  	(*GetTeamRequest)(nil),        // 0: luci.teams.v1.GetTeamRequest
   202  	(*Team)(nil),                  // 1: luci.teams.v1.Team
   203  	(*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp
   204  }
   205  var file_go_chromium_org_luci_teams_proto_v1_teams_proto_depIdxs = []int32{
   206  	2, // 0: luci.teams.v1.Team.create_time:type_name -> google.protobuf.Timestamp
   207  	0, // 1: luci.teams.v1.Teams.Get:input_type -> luci.teams.v1.GetTeamRequest
   208  	1, // 2: luci.teams.v1.Teams.Get:output_type -> luci.teams.v1.Team
   209  	2, // [2:3] is the sub-list for method output_type
   210  	1, // [1:2] is the sub-list for method input_type
   211  	1, // [1:1] is the sub-list for extension type_name
   212  	1, // [1:1] is the sub-list for extension extendee
   213  	0, // [0:1] is the sub-list for field type_name
   214  }
   215  
   216  func init() { file_go_chromium_org_luci_teams_proto_v1_teams_proto_init() }
   217  func file_go_chromium_org_luci_teams_proto_v1_teams_proto_init() {
   218  	if File_go_chromium_org_luci_teams_proto_v1_teams_proto != nil {
   219  		return
   220  	}
   221  	if !protoimpl.UnsafeEnabled {
   222  		file_go_chromium_org_luci_teams_proto_v1_teams_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   223  			switch v := v.(*GetTeamRequest); i {
   224  			case 0:
   225  				return &v.state
   226  			case 1:
   227  				return &v.sizeCache
   228  			case 2:
   229  				return &v.unknownFields
   230  			default:
   231  				return nil
   232  			}
   233  		}
   234  		file_go_chromium_org_luci_teams_proto_v1_teams_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   235  			switch v := v.(*Team); i {
   236  			case 0:
   237  				return &v.state
   238  			case 1:
   239  				return &v.sizeCache
   240  			case 2:
   241  				return &v.unknownFields
   242  			default:
   243  				return nil
   244  			}
   245  		}
   246  	}
   247  	type x struct{}
   248  	out := protoimpl.TypeBuilder{
   249  		File: protoimpl.DescBuilder{
   250  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   251  			RawDescriptor: file_go_chromium_org_luci_teams_proto_v1_teams_proto_rawDesc,
   252  			NumEnums:      0,
   253  			NumMessages:   2,
   254  			NumExtensions: 0,
   255  			NumServices:   1,
   256  		},
   257  		GoTypes:           file_go_chromium_org_luci_teams_proto_v1_teams_proto_goTypes,
   258  		DependencyIndexes: file_go_chromium_org_luci_teams_proto_v1_teams_proto_depIdxs,
   259  		MessageInfos:      file_go_chromium_org_luci_teams_proto_v1_teams_proto_msgTypes,
   260  	}.Build()
   261  	File_go_chromium_org_luci_teams_proto_v1_teams_proto = out.File
   262  	file_go_chromium_org_luci_teams_proto_v1_teams_proto_rawDesc = nil
   263  	file_go_chromium_org_luci_teams_proto_v1_teams_proto_goTypes = nil
   264  	file_go_chromium_org_luci_teams_proto_v1_teams_proto_depIdxs = nil
   265  }
   266  
   267  // Reference imports to suppress errors if they are not otherwise used.
   268  var _ context.Context
   269  var _ grpc.ClientConnInterface
   270  
   271  // This is a compile-time assertion to ensure that this generated file
   272  // is compatible with the grpc package it is being compiled against.
   273  const _ = grpc.SupportPackageIsVersion6
   274  
   275  // TeamsClient is the client API for Teams service.
   276  //
   277  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   278  type TeamsClient interface {
   279  	// Get a team.
   280  	// Use the resource alias 'my' to get just the current user's team.
   281  	Get(ctx context.Context, in *GetTeamRequest, opts ...grpc.CallOption) (*Team, error)
   282  }
   283  type teamsPRPCClient struct {
   284  	client *prpc.Client
   285  }
   286  
   287  func NewTeamsPRPCClient(client *prpc.Client) TeamsClient {
   288  	return &teamsPRPCClient{client}
   289  }
   290  
   291  func (c *teamsPRPCClient) Get(ctx context.Context, in *GetTeamRequest, opts ...grpc.CallOption) (*Team, error) {
   292  	out := new(Team)
   293  	err := c.client.Call(ctx, "luci.teams.v1.Teams", "Get", in, out, opts...)
   294  	if err != nil {
   295  		return nil, err
   296  	}
   297  	return out, nil
   298  }
   299  
   300  type teamsClient struct {
   301  	cc grpc.ClientConnInterface
   302  }
   303  
   304  func NewTeamsClient(cc grpc.ClientConnInterface) TeamsClient {
   305  	return &teamsClient{cc}
   306  }
   307  
   308  func (c *teamsClient) Get(ctx context.Context, in *GetTeamRequest, opts ...grpc.CallOption) (*Team, error) {
   309  	out := new(Team)
   310  	err := c.cc.Invoke(ctx, "/luci.teams.v1.Teams/Get", in, out, opts...)
   311  	if err != nil {
   312  		return nil, err
   313  	}
   314  	return out, nil
   315  }
   316  
   317  // TeamsServer is the server API for Teams service.
   318  type TeamsServer interface {
   319  	// Get a team.
   320  	// Use the resource alias 'my' to get just the current user's team.
   321  	Get(context.Context, *GetTeamRequest) (*Team, error)
   322  }
   323  
   324  // UnimplementedTeamsServer can be embedded to have forward compatible implementations.
   325  type UnimplementedTeamsServer struct {
   326  }
   327  
   328  func (*UnimplementedTeamsServer) Get(context.Context, *GetTeamRequest) (*Team, error) {
   329  	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
   330  }
   331  
   332  func RegisterTeamsServer(s prpc.Registrar, srv TeamsServer) {
   333  	s.RegisterService(&_Teams_serviceDesc, srv)
   334  }
   335  
   336  func _Teams_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   337  	in := new(GetTeamRequest)
   338  	if err := dec(in); err != nil {
   339  		return nil, err
   340  	}
   341  	if interceptor == nil {
   342  		return srv.(TeamsServer).Get(ctx, in)
   343  	}
   344  	info := &grpc.UnaryServerInfo{
   345  		Server:     srv,
   346  		FullMethod: "/luci.teams.v1.Teams/Get",
   347  	}
   348  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   349  		return srv.(TeamsServer).Get(ctx, req.(*GetTeamRequest))
   350  	}
   351  	return interceptor(ctx, in, info, handler)
   352  }
   353  
   354  var _Teams_serviceDesc = grpc.ServiceDesc{
   355  	ServiceName: "luci.teams.v1.Teams",
   356  	HandlerType: (*TeamsServer)(nil),
   357  	Methods: []grpc.MethodDesc{
   358  		{
   359  			MethodName: "Get",
   360  			Handler:    _Teams_Get_Handler,
   361  		},
   362  	},
   363  	Streams:  []grpc.StreamDesc{},
   364  	Metadata: "go.chromium.org/luci/teams/proto/v1/teams.proto",
   365  }