mirror of
https://github.com/absmach/magistrala.git
synced 2026-06-23 04:10:28 +00:00
61d0427898
Signed-off-by: dusan <borovcanindusan1@gmail.com>
429 lines
13 KiB
Go
429 lines
13 KiB
Go
// Copyright (c) Abstract Machines
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.11
|
|
// protoc v6.33.0
|
|
// source: users/v1/users.proto
|
|
|
|
package v1
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
structpb "google.golang.org/protobuf/types/known/structpb"
|
|
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
|
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)
|
|
)
|
|
|
|
type RetrieveUsersReq struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
|
|
Offset uint64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
|
|
Limit uint64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *RetrieveUsersReq) Reset() {
|
|
*x = RetrieveUsersReq{}
|
|
mi := &file_users_v1_users_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *RetrieveUsersReq) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*RetrieveUsersReq) ProtoMessage() {}
|
|
|
|
func (x *RetrieveUsersReq) ProtoReflect() protoreflect.Message {
|
|
mi := &file_users_v1_users_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use RetrieveUsersReq.ProtoReflect.Descriptor instead.
|
|
func (*RetrieveUsersReq) Descriptor() ([]byte, []int) {
|
|
return file_users_v1_users_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *RetrieveUsersReq) GetIds() []string {
|
|
if x != nil {
|
|
return x.Ids
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *RetrieveUsersReq) GetOffset() uint64 {
|
|
if x != nil {
|
|
return x.Offset
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *RetrieveUsersReq) GetLimit() uint64 {
|
|
if x != nil {
|
|
return x.Limit
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type RetrieveUsersRes struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Total uint64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
|
|
Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
|
|
Offset uint64 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
|
|
Users []*User `protobuf:"bytes,4,rep,name=users,proto3" json:"users,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *RetrieveUsersRes) Reset() {
|
|
*x = RetrieveUsersRes{}
|
|
mi := &file_users_v1_users_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *RetrieveUsersRes) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*RetrieveUsersRes) ProtoMessage() {}
|
|
|
|
func (x *RetrieveUsersRes) ProtoReflect() protoreflect.Message {
|
|
mi := &file_users_v1_users_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use RetrieveUsersRes.ProtoReflect.Descriptor instead.
|
|
func (*RetrieveUsersRes) Descriptor() ([]byte, []int) {
|
|
return file_users_v1_users_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *RetrieveUsersRes) GetTotal() uint64 {
|
|
if x != nil {
|
|
return x.Total
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *RetrieveUsersRes) GetLimit() uint64 {
|
|
if x != nil {
|
|
return x.Limit
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *RetrieveUsersRes) GetOffset() uint64 {
|
|
if x != nil {
|
|
return x.Offset
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *RetrieveUsersRes) GetUsers() []*User {
|
|
if x != nil {
|
|
return x.Users
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type User struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
FirstName string `protobuf:"bytes,2,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"`
|
|
LastName string `protobuf:"bytes,3,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
|
|
Tags []string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty"`
|
|
Metadata *structpb.Struct `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
|
|
PrivateMetadata *structpb.Struct `protobuf:"bytes,6,opt,name=private_metadata,json=privateMetadata,proto3" json:"private_metadata,omitempty"`
|
|
Status uint32 `protobuf:"varint,7,opt,name=status,proto3" json:"status,omitempty"`
|
|
Role uint32 `protobuf:"varint,8,opt,name=role,proto3" json:"role,omitempty"`
|
|
ProfilePicture string `protobuf:"bytes,9,opt,name=profile_picture,json=profilePicture,proto3" json:"profile_picture,omitempty"`
|
|
Username string `protobuf:"bytes,10,opt,name=username,proto3" json:"username,omitempty"`
|
|
Email string `protobuf:"bytes,11,opt,name=email,proto3" json:"email,omitempty"`
|
|
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
|
|
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
|
|
UpdatedBy string `protobuf:"bytes,14,opt,name=updated_by,json=updatedBy,proto3" json:"updated_by,omitempty"`
|
|
VerifiedAt *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=verified_at,json=verifiedAt,proto3" json:"verified_at,omitempty"`
|
|
AuthProvider string `protobuf:"bytes,16,opt,name=auth_provider,json=authProvider,proto3" json:"auth_provider,omitempty"`
|
|
Permissions []string `protobuf:"bytes,17,rep,name=permissions,proto3" json:"permissions,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *User) Reset() {
|
|
*x = User{}
|
|
mi := &file_users_v1_users_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *User) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*User) ProtoMessage() {}
|
|
|
|
func (x *User) ProtoReflect() protoreflect.Message {
|
|
mi := &file_users_v1_users_proto_msgTypes[2]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use User.ProtoReflect.Descriptor instead.
|
|
func (*User) Descriptor() ([]byte, []int) {
|
|
return file_users_v1_users_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *User) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetFirstName() string {
|
|
if x != nil {
|
|
return x.FirstName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetLastName() string {
|
|
if x != nil {
|
|
return x.LastName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetTags() []string {
|
|
if x != nil {
|
|
return x.Tags
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *User) GetMetadata() *structpb.Struct {
|
|
if x != nil {
|
|
return x.Metadata
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *User) GetPrivateMetadata() *structpb.Struct {
|
|
if x != nil {
|
|
return x.PrivateMetadata
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *User) GetStatus() uint32 {
|
|
if x != nil {
|
|
return x.Status
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *User) GetRole() uint32 {
|
|
if x != nil {
|
|
return x.Role
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *User) GetProfilePicture() string {
|
|
if x != nil {
|
|
return x.ProfilePicture
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetUsername() string {
|
|
if x != nil {
|
|
return x.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetEmail() string {
|
|
if x != nil {
|
|
return x.Email
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetCreatedAt() *timestamppb.Timestamp {
|
|
if x != nil {
|
|
return x.CreatedAt
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *User) GetUpdatedAt() *timestamppb.Timestamp {
|
|
if x != nil {
|
|
return x.UpdatedAt
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *User) GetUpdatedBy() string {
|
|
if x != nil {
|
|
return x.UpdatedBy
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetVerifiedAt() *timestamppb.Timestamp {
|
|
if x != nil {
|
|
return x.VerifiedAt
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *User) GetAuthProvider() string {
|
|
if x != nil {
|
|
return x.AuthProvider
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *User) GetPermissions() []string {
|
|
if x != nil {
|
|
return x.Permissions
|
|
}
|
|
return nil
|
|
}
|
|
|
|
var File_users_v1_users_proto protoreflect.FileDescriptor
|
|
|
|
const file_users_v1_users_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x14users/v1/users.proto\x12\busers.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"R\n" +
|
|
"\x10RetrieveUsersReq\x12\x10\n" +
|
|
"\x03ids\x18\x01 \x03(\tR\x03ids\x12\x16\n" +
|
|
"\x06offset\x18\x02 \x01(\x04R\x06offset\x12\x14\n" +
|
|
"\x05limit\x18\x03 \x01(\x04R\x05limit\"|\n" +
|
|
"\x10RetrieveUsersRes\x12\x14\n" +
|
|
"\x05total\x18\x01 \x01(\x04R\x05total\x12\x14\n" +
|
|
"\x05limit\x18\x02 \x01(\x04R\x05limit\x12\x16\n" +
|
|
"\x06offset\x18\x03 \x01(\x04R\x06offset\x12$\n" +
|
|
"\x05users\x18\x04 \x03(\v2\x0e.users.v1.UserR\x05users\"\xff\x04\n" +
|
|
"\x04User\x12\x0e\n" +
|
|
"\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n" +
|
|
"\n" +
|
|
"first_name\x18\x02 \x01(\tR\tfirstName\x12\x1b\n" +
|
|
"\tlast_name\x18\x03 \x01(\tR\blastName\x12\x12\n" +
|
|
"\x04tags\x18\x04 \x03(\tR\x04tags\x123\n" +
|
|
"\bmetadata\x18\x05 \x01(\v2\x17.google.protobuf.StructR\bmetadata\x12B\n" +
|
|
"\x10private_metadata\x18\x06 \x01(\v2\x17.google.protobuf.StructR\x0fprivateMetadata\x12\x16\n" +
|
|
"\x06status\x18\a \x01(\rR\x06status\x12\x12\n" +
|
|
"\x04role\x18\b \x01(\rR\x04role\x12'\n" +
|
|
"\x0fprofile_picture\x18\t \x01(\tR\x0eprofilePicture\x12\x1a\n" +
|
|
"\busername\x18\n" +
|
|
" \x01(\tR\busername\x12\x14\n" +
|
|
"\x05email\x18\v \x01(\tR\x05email\x129\n" +
|
|
"\n" +
|
|
"created_at\x18\f \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" +
|
|
"\n" +
|
|
"updated_at\x18\r \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x1d\n" +
|
|
"\n" +
|
|
"updated_by\x18\x0e \x01(\tR\tupdatedBy\x12;\n" +
|
|
"\vverified_at\x18\x0f \x01(\v2\x1a.google.protobuf.TimestampR\n" +
|
|
"verifiedAt\x12#\n" +
|
|
"\rauth_provider\x18\x10 \x01(\tR\fauthProvider\x12 \n" +
|
|
"\vpermissions\x18\x11 \x03(\tR\vpermissions2Y\n" +
|
|
"\fUsersService\x12I\n" +
|
|
"\rRetrieveUsers\x12\x1a.users.v1.RetrieveUsersReq\x1a\x1a.users.v1.RetrieveUsersRes\"\x00B1Z/github.com/absmach/magistrala/api/grpc/users/v1b\x06proto3"
|
|
|
|
var (
|
|
file_users_v1_users_proto_rawDescOnce sync.Once
|
|
file_users_v1_users_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_users_v1_users_proto_rawDescGZIP() []byte {
|
|
file_users_v1_users_proto_rawDescOnce.Do(func() {
|
|
file_users_v1_users_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_users_v1_users_proto_rawDesc), len(file_users_v1_users_proto_rawDesc)))
|
|
})
|
|
return file_users_v1_users_proto_rawDescData
|
|
}
|
|
|
|
var file_users_v1_users_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
|
var file_users_v1_users_proto_goTypes = []any{
|
|
(*RetrieveUsersReq)(nil), // 0: users.v1.RetrieveUsersReq
|
|
(*RetrieveUsersRes)(nil), // 1: users.v1.RetrieveUsersRes
|
|
(*User)(nil), // 2: users.v1.User
|
|
(*structpb.Struct)(nil), // 3: google.protobuf.Struct
|
|
(*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp
|
|
}
|
|
var file_users_v1_users_proto_depIdxs = []int32{
|
|
2, // 0: users.v1.RetrieveUsersRes.users:type_name -> users.v1.User
|
|
3, // 1: users.v1.User.metadata:type_name -> google.protobuf.Struct
|
|
3, // 2: users.v1.User.private_metadata:type_name -> google.protobuf.Struct
|
|
4, // 3: users.v1.User.created_at:type_name -> google.protobuf.Timestamp
|
|
4, // 4: users.v1.User.updated_at:type_name -> google.protobuf.Timestamp
|
|
4, // 5: users.v1.User.verified_at:type_name -> google.protobuf.Timestamp
|
|
0, // 6: users.v1.UsersService.RetrieveUsers:input_type -> users.v1.RetrieveUsersReq
|
|
1, // 7: users.v1.UsersService.RetrieveUsers:output_type -> users.v1.RetrieveUsersRes
|
|
7, // [7:8] is the sub-list for method output_type
|
|
6, // [6:7] is the sub-list for method input_type
|
|
6, // [6:6] is the sub-list for extension type_name
|
|
6, // [6:6] is the sub-list for extension extendee
|
|
0, // [0:6] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_users_v1_users_proto_init() }
|
|
func file_users_v1_users_proto_init() {
|
|
if File_users_v1_users_proto != nil {
|
|
return
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_users_v1_users_proto_rawDesc), len(file_users_v1_users_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 3,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_users_v1_users_proto_goTypes,
|
|
DependencyIndexes: file_users_v1_users_proto_depIdxs,
|
|
MessageInfos: file_users_v1_users_proto_msgTypes,
|
|
}.Build()
|
|
File_users_v1_users_proto = out.File
|
|
file_users_v1_users_proto_goTypes = nil
|
|
file_users_v1_users_proto_depIdxs = nil
|
|
}
|