Skip to content
Snippets Groups Projects
api.pb.go 99.7 KiB
Newer Older
  • Learn to ignore specific revisions
  • Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    // Code generated by protoc-gen-go. DO NOT EDIT.
    
    // 	protoc-gen-go v1.32.0
    // 	protoc        v4.24.4
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    // source: api/v2/api.proto
    
    package api
    
    import (
    
    	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    	reflect "reflect"
    	sync "sync"
    
    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)
    )
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    
    // Client represents an OAuth2 client.
    type Client struct {
    
    	state         protoimpl.MessageState
    	sizeCache     protoimpl.SizeCache
    	unknownFields protoimpl.UnknownFields
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    
    
    	Id           string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
    	Secret       string   `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"`
    	RedirectUris []string `protobuf:"bytes,3,rep,name=redirect_uris,json=redirectUris,proto3" json:"redirect_uris,omitempty"`
    	TrustedPeers []string `protobuf:"bytes,4,rep,name=trusted_peers,json=trustedPeers,proto3" json:"trusted_peers,omitempty"`
    	Public       bool     `protobuf:"varint,5,opt,name=public,proto3" json:"public,omitempty"`
    	Name         string   `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"`
    	LogoUrl      string   `protobuf:"bytes,7,opt,name=logo_url,json=logoUrl,proto3" json:"logo_url,omitempty"`
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (x *Client) Reset() {
    	*x = Client{}
    	if protoimpl.UnsafeEnabled {
    		mi := &file_api_v2_api_proto_msgTypes[0]
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		ms.StoreMessageInfo(mi)
    	}
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (x *Client) String() string {
    	return protoimpl.X.MessageStringOf(x)
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (*Client) ProtoMessage() {}
    
    func (x *Client) ProtoReflect() protoreflect.Message {
    	mi := &file_api_v2_api_proto_msgTypes[0]
    	if protoimpl.UnsafeEnabled && x != nil {
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		if ms.LoadMessageInfo() == nil {
    			ms.StoreMessageInfo(mi)
    		}
    		return ms
    	}
    	return mi.MessageOf(x)
    
    // Deprecated: Use Client.ProtoReflect.Descriptor instead.
    func (*Client) Descriptor() ([]byte, []int) {
    	return file_api_v2_api_proto_rawDescGZIP(), []int{0}
    }
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    
    
    func (x *Client) GetId() string {
    	if x != nil {
    		return x.Id
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return ""
    }
    
    
    func (x *Client) GetSecret() string {
    	if x != nil {
    		return x.Secret
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return ""
    }
    
    
    func (x *Client) GetRedirectUris() []string {
    	if x != nil {
    		return x.RedirectUris
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return nil
    }
    
    
    func (x *Client) GetTrustedPeers() []string {
    	if x != nil {
    		return x.TrustedPeers
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return nil
    }
    
    
    func (x *Client) GetPublic() bool {
    	if x != nil {
    		return x.Public
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return false
    }
    
    
    func (x *Client) GetName() string {
    	if x != nil {
    		return x.Name
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return ""
    }
    
    
    func (x *Client) GetLogoUrl() string {
    	if x != nil {
    		return x.LogoUrl
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return ""
    }
    
    
    // GetClientReq is a request to retrieve client details.
    type GetClientReq struct {
    	state         protoimpl.MessageState
    	sizeCache     protoimpl.SizeCache
    	unknownFields protoimpl.UnknownFields
    
    	// The ID of the client.
    	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
    }
    
    func (x *GetClientReq) Reset() {
    	*x = GetClientReq{}
    	if protoimpl.UnsafeEnabled {
    		mi := &file_api_v2_api_proto_msgTypes[1]
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		ms.StoreMessageInfo(mi)
    	}
    }
    
    func (x *GetClientReq) String() string {
    	return protoimpl.X.MessageStringOf(x)
    }
    
    func (*GetClientReq) ProtoMessage() {}
    
    func (x *GetClientReq) ProtoReflect() protoreflect.Message {
    	mi := &file_api_v2_api_proto_msgTypes[1]
    	if protoimpl.UnsafeEnabled && x != nil {
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		if ms.LoadMessageInfo() == nil {
    			ms.StoreMessageInfo(mi)
    		}
    		return ms
    	}
    	return mi.MessageOf(x)
    }
    
    // Deprecated: Use GetClientReq.ProtoReflect.Descriptor instead.
    func (*GetClientReq) Descriptor() ([]byte, []int) {
    	return file_api_v2_api_proto_rawDescGZIP(), []int{1}
    }
    
    func (x *GetClientReq) GetId() string {
    	if x != nil {
    		return x.Id
    	}
    	return ""
    }
    
    // GetClientResp returns the client details.
    type GetClientResp struct {
    	state         protoimpl.MessageState
    	sizeCache     protoimpl.SizeCache
    	unknownFields protoimpl.UnknownFields
    
    	Client *Client `protobuf:"bytes,1,opt,name=client,proto3" json:"client,omitempty"`
    }
    
    func (x *GetClientResp) Reset() {
    	*x = GetClientResp{}
    	if protoimpl.UnsafeEnabled {
    		mi := &file_api_v2_api_proto_msgTypes[2]
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		ms.StoreMessageInfo(mi)
    	}
    }
    
    func (x *GetClientResp) String() string {
    	return protoimpl.X.MessageStringOf(x)
    }
    
    func (*GetClientResp) ProtoMessage() {}
    
    func (x *GetClientResp) ProtoReflect() protoreflect.Message {
    	mi := &file_api_v2_api_proto_msgTypes[2]
    	if protoimpl.UnsafeEnabled && x != nil {
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		if ms.LoadMessageInfo() == nil {
    			ms.StoreMessageInfo(mi)
    		}
    		return ms
    	}
    	return mi.MessageOf(x)
    }
    
    // Deprecated: Use GetClientResp.ProtoReflect.Descriptor instead.
    func (*GetClientResp) Descriptor() ([]byte, []int) {
    	return file_api_v2_api_proto_rawDescGZIP(), []int{2}
    }
    
    func (x *GetClientResp) GetClient() *Client {
    	if x != nil {
    		return x.Client
    	}
    	return nil
    }
    
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    // CreateClientReq is a request to make a client.
    type CreateClientReq struct {
    
    	state         protoimpl.MessageState
    	sizeCache     protoimpl.SizeCache
    	unknownFields protoimpl.UnknownFields
    
    	Client *Client `protobuf:"bytes,1,opt,name=client,proto3" json:"client,omitempty"`
    
    func (x *CreateClientReq) Reset() {
    	*x = CreateClientReq{}
    	if protoimpl.UnsafeEnabled {
    
    		mi := &file_api_v2_api_proto_msgTypes[3]
    
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		ms.StoreMessageInfo(mi)
    	}
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (x *CreateClientReq) String() string {
    	return protoimpl.X.MessageStringOf(x)
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (*CreateClientReq) ProtoMessage() {}
    
    func (x *CreateClientReq) ProtoReflect() protoreflect.Message {
    
    	mi := &file_api_v2_api_proto_msgTypes[3]
    
    	if protoimpl.UnsafeEnabled && x != nil {
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		if ms.LoadMessageInfo() == nil {
    			ms.StoreMessageInfo(mi)
    		}
    		return ms
    	}
    	return mi.MessageOf(x)
    
    // Deprecated: Use CreateClientReq.ProtoReflect.Descriptor instead.
    func (*CreateClientReq) Descriptor() ([]byte, []int) {
    
    	return file_api_v2_api_proto_rawDescGZIP(), []int{3}
    
    func (x *CreateClientReq) GetClient() *Client {
    	if x != nil {
    		return x.Client
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return nil
    }
    
    // CreateClientResp returns the response from creating a client.
    type CreateClientResp struct {
    
    	state         protoimpl.MessageState
    	sizeCache     protoimpl.SizeCache
    	unknownFields protoimpl.UnknownFields
    
    	AlreadyExists bool    `protobuf:"varint,1,opt,name=already_exists,json=alreadyExists,proto3" json:"already_exists,omitempty"`
    	Client        *Client `protobuf:"bytes,2,opt,name=client,proto3" json:"client,omitempty"`
    
    func (x *CreateClientResp) Reset() {
    	*x = CreateClientResp{}
    	if protoimpl.UnsafeEnabled {
    
    		mi := &file_api_v2_api_proto_msgTypes[4]
    
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		ms.StoreMessageInfo(mi)
    	}
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (x *CreateClientResp) String() string {
    	return protoimpl.X.MessageStringOf(x)
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (*CreateClientResp) ProtoMessage() {}
    
    func (x *CreateClientResp) ProtoReflect() protoreflect.Message {
    
    	mi := &file_api_v2_api_proto_msgTypes[4]
    
    	if protoimpl.UnsafeEnabled && x != nil {
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		if ms.LoadMessageInfo() == nil {
    			ms.StoreMessageInfo(mi)
    		}
    		return ms
    	}
    	return mi.MessageOf(x)
    
    // Deprecated: Use CreateClientResp.ProtoReflect.Descriptor instead.
    func (*CreateClientResp) Descriptor() ([]byte, []int) {
    
    	return file_api_v2_api_proto_rawDescGZIP(), []int{4}
    
    func (x *CreateClientResp) GetAlreadyExists() bool {
    	if x != nil {
    		return x.AlreadyExists
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return false
    }
    
    
    func (x *CreateClientResp) GetClient() *Client {
    	if x != nil {
    		return x.Client
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return nil
    }
    
    // DeleteClientReq is a request to delete a client.
    type DeleteClientReq struct {
    
    	state         protoimpl.MessageState
    	sizeCache     protoimpl.SizeCache
    	unknownFields protoimpl.UnknownFields
    
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	// The ID of the client.
    
    	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
    
    func (x *DeleteClientReq) Reset() {
    	*x = DeleteClientReq{}
    	if protoimpl.UnsafeEnabled {
    
    		mi := &file_api_v2_api_proto_msgTypes[5]
    
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		ms.StoreMessageInfo(mi)
    	}
    
    func (x *DeleteClientReq) String() string {
    	return protoimpl.X.MessageStringOf(x)
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (*DeleteClientReq) ProtoMessage() {}
    
    func (x *DeleteClientReq) ProtoReflect() protoreflect.Message {
    
    	mi := &file_api_v2_api_proto_msgTypes[5]
    
    	if protoimpl.UnsafeEnabled && x != nil {
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		if ms.LoadMessageInfo() == nil {
    			ms.StoreMessageInfo(mi)
    		}
    		return ms
    	}
    	return mi.MessageOf(x)
    
    // Deprecated: Use DeleteClientReq.ProtoReflect.Descriptor instead.
    func (*DeleteClientReq) Descriptor() ([]byte, []int) {
    
    	return file_api_v2_api_proto_rawDescGZIP(), []int{5}
    
    func (x *DeleteClientReq) GetId() string {
    	if x != nil {
    		return x.Id
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return ""
    }
    
    // DeleteClientResp determines if the client is deleted successfully.
    type DeleteClientResp struct {
    
    	state         protoimpl.MessageState
    	sizeCache     protoimpl.SizeCache
    	unknownFields protoimpl.UnknownFields
    
    	NotFound bool `protobuf:"varint,1,opt,name=not_found,json=notFound,proto3" json:"not_found,omitempty"`
    
    func (x *DeleteClientResp) Reset() {
    	*x = DeleteClientResp{}
    	if protoimpl.UnsafeEnabled {
    
    		mi := &file_api_v2_api_proto_msgTypes[6]
    
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		ms.StoreMessageInfo(mi)
    	}
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (x *DeleteClientResp) String() string {
    	return protoimpl.X.MessageStringOf(x)
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (*DeleteClientResp) ProtoMessage() {}
    
    func (x *DeleteClientResp) ProtoReflect() protoreflect.Message {
    
    	mi := &file_api_v2_api_proto_msgTypes[6]
    
    	if protoimpl.UnsafeEnabled && x != nil {
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		if ms.LoadMessageInfo() == nil {
    			ms.StoreMessageInfo(mi)
    		}
    		return ms
    	}
    	return mi.MessageOf(x)
    
    // Deprecated: Use DeleteClientResp.ProtoReflect.Descriptor instead.
    func (*DeleteClientResp) Descriptor() ([]byte, []int) {
    
    	return file_api_v2_api_proto_rawDescGZIP(), []int{6}
    
    func (x *DeleteClientResp) GetNotFound() bool {
    	if x != nil {
    		return x.NotFound
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return false
    }
    
    
    Josh Soref's avatar
    Josh Soref committed
    // UpdateClientReq is a request to update an existing client.
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    type UpdateClientReq struct {
    
    	state         protoimpl.MessageState
    	sizeCache     protoimpl.SizeCache
    	unknownFields protoimpl.UnknownFields
    
    	Id           string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
    	RedirectUris []string `protobuf:"bytes,2,rep,name=redirect_uris,json=redirectUris,proto3" json:"redirect_uris,omitempty"`
    	TrustedPeers []string `protobuf:"bytes,3,rep,name=trusted_peers,json=trustedPeers,proto3" json:"trusted_peers,omitempty"`
    	Name         string   `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
    	LogoUrl      string   `protobuf:"bytes,5,opt,name=logo_url,json=logoUrl,proto3" json:"logo_url,omitempty"`
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (x *UpdateClientReq) Reset() {
    	*x = UpdateClientReq{}
    	if protoimpl.UnsafeEnabled {
    
    		mi := &file_api_v2_api_proto_msgTypes[7]
    
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		ms.StoreMessageInfo(mi)
    	}
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (x *UpdateClientReq) String() string {
    	return protoimpl.X.MessageStringOf(x)
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (*UpdateClientReq) ProtoMessage() {}
    
    func (x *UpdateClientReq) ProtoReflect() protoreflect.Message {
    
    	mi := &file_api_v2_api_proto_msgTypes[7]
    
    	if protoimpl.UnsafeEnabled && x != nil {
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		if ms.LoadMessageInfo() == nil {
    			ms.StoreMessageInfo(mi)
    		}
    		return ms
    	}
    	return mi.MessageOf(x)
    
    // Deprecated: Use UpdateClientReq.ProtoReflect.Descriptor instead.
    func (*UpdateClientReq) Descriptor() ([]byte, []int) {
    
    	return file_api_v2_api_proto_rawDescGZIP(), []int{7}
    
    func (x *UpdateClientReq) GetId() string {
    	if x != nil {
    		return x.Id
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return ""
    }
    
    
    func (x *UpdateClientReq) GetRedirectUris() []string {
    	if x != nil {
    		return x.RedirectUris
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return nil
    }
    
    
    func (x *UpdateClientReq) GetTrustedPeers() []string {
    	if x != nil {
    		return x.TrustedPeers
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return nil
    }
    
    
    func (x *UpdateClientReq) GetName() string {
    	if x != nil {
    		return x.Name
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return ""
    }
    
    
    func (x *UpdateClientReq) GetLogoUrl() string {
    	if x != nil {
    		return x.LogoUrl
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return ""
    }
    
    
    Josh Soref's avatar
    Josh Soref committed
    // UpdateClientResp returns the response from updating a client.
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    type UpdateClientResp struct {
    
    	state         protoimpl.MessageState
    	sizeCache     protoimpl.SizeCache
    	unknownFields protoimpl.UnknownFields
    
    	NotFound bool `protobuf:"varint,1,opt,name=not_found,json=notFound,proto3" json:"not_found,omitempty"`
    
    func (x *UpdateClientResp) Reset() {
    	*x = UpdateClientResp{}
    	if protoimpl.UnsafeEnabled {
    
    		mi := &file_api_v2_api_proto_msgTypes[8]
    
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		ms.StoreMessageInfo(mi)
    	}
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (x *UpdateClientResp) String() string {
    	return protoimpl.X.MessageStringOf(x)
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (*UpdateClientResp) ProtoMessage() {}
    
    func (x *UpdateClientResp) ProtoReflect() protoreflect.Message {
    
    	mi := &file_api_v2_api_proto_msgTypes[8]
    
    	if protoimpl.UnsafeEnabled && x != nil {
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		if ms.LoadMessageInfo() == nil {
    			ms.StoreMessageInfo(mi)
    		}
    		return ms
    	}
    	return mi.MessageOf(x)
    
    // Deprecated: Use UpdateClientResp.ProtoReflect.Descriptor instead.
    func (*UpdateClientResp) Descriptor() ([]byte, []int) {
    
    	return file_api_v2_api_proto_rawDescGZIP(), []int{8}
    
    func (x *UpdateClientResp) GetNotFound() bool {
    	if x != nil {
    		return x.NotFound
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return false
    }
    
    // Password is an email for password mapping managed by the storage.
    type Password struct {
    
    	state         protoimpl.MessageState
    	sizeCache     protoimpl.SizeCache
    	unknownFields protoimpl.UnknownFields
    
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
    	// Currently we do not accept plain text passwords. Could be an option in the future.
    
    	Hash     []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
    	Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
    	UserId   string `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
    
    func (x *Password) Reset() {
    	*x = Password{}
    	if protoimpl.UnsafeEnabled {
    
    		mi := &file_api_v2_api_proto_msgTypes[9]
    
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		ms.StoreMessageInfo(mi)
    	}
    
    func (x *Password) String() string {
    	return protoimpl.X.MessageStringOf(x)
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (*Password) ProtoMessage() {}
    
    func (x *Password) ProtoReflect() protoreflect.Message {
    
    	mi := &file_api_v2_api_proto_msgTypes[9]
    
    	if protoimpl.UnsafeEnabled && x != nil {
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		if ms.LoadMessageInfo() == nil {
    			ms.StoreMessageInfo(mi)
    		}
    		return ms
    	}
    	return mi.MessageOf(x)
    
    // Deprecated: Use Password.ProtoReflect.Descriptor instead.
    func (*Password) Descriptor() ([]byte, []int) {
    
    	return file_api_v2_api_proto_rawDescGZIP(), []int{9}
    
    func (x *Password) GetEmail() string {
    	if x != nil {
    		return x.Email
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return ""
    }
    
    
    func (x *Password) GetHash() []byte {
    	if x != nil {
    		return x.Hash
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return nil
    }
    
    
    func (x *Password) GetUsername() string {
    	if x != nil {
    		return x.Username
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return ""
    }
    
    
    func (x *Password) GetUserId() string {
    	if x != nil {
    		return x.UserId
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return ""
    }
    
    // CreatePasswordReq is a request to make a password.
    type CreatePasswordReq struct {
    
    	state         protoimpl.MessageState
    	sizeCache     protoimpl.SizeCache
    	unknownFields protoimpl.UnknownFields
    
    	Password *Password `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
    
    func (x *CreatePasswordReq) Reset() {
    	*x = CreatePasswordReq{}
    	if protoimpl.UnsafeEnabled {
    
    		mi := &file_api_v2_api_proto_msgTypes[10]
    
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		ms.StoreMessageInfo(mi)
    	}
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (x *CreatePasswordReq) String() string {
    	return protoimpl.X.MessageStringOf(x)
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (*CreatePasswordReq) ProtoMessage() {}
    
    func (x *CreatePasswordReq) ProtoReflect() protoreflect.Message {
    
    	mi := &file_api_v2_api_proto_msgTypes[10]
    
    	if protoimpl.UnsafeEnabled && x != nil {
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		if ms.LoadMessageInfo() == nil {
    			ms.StoreMessageInfo(mi)
    		}
    		return ms
    	}
    	return mi.MessageOf(x)
    
    // Deprecated: Use CreatePasswordReq.ProtoReflect.Descriptor instead.
    func (*CreatePasswordReq) Descriptor() ([]byte, []int) {
    
    	return file_api_v2_api_proto_rawDescGZIP(), []int{10}
    
    func (x *CreatePasswordReq) GetPassword() *Password {
    	if x != nil {
    		return x.Password
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return nil
    }
    
    // CreatePasswordResp returns the response from creating a password.
    type CreatePasswordResp struct {
    
    	state         protoimpl.MessageState
    	sizeCache     protoimpl.SizeCache
    	unknownFields protoimpl.UnknownFields
    
    	AlreadyExists bool `protobuf:"varint,1,opt,name=already_exists,json=alreadyExists,proto3" json:"already_exists,omitempty"`
    
    func (x *CreatePasswordResp) Reset() {
    	*x = CreatePasswordResp{}
    	if protoimpl.UnsafeEnabled {
    
    		mi := &file_api_v2_api_proto_msgTypes[11]
    
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		ms.StoreMessageInfo(mi)
    	}
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (x *CreatePasswordResp) String() string {
    	return protoimpl.X.MessageStringOf(x)
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (*CreatePasswordResp) ProtoMessage() {}
    
    func (x *CreatePasswordResp) ProtoReflect() protoreflect.Message {
    
    	mi := &file_api_v2_api_proto_msgTypes[11]
    
    	if protoimpl.UnsafeEnabled && x != nil {
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		if ms.LoadMessageInfo() == nil {
    			ms.StoreMessageInfo(mi)
    		}
    		return ms
    	}
    	return mi.MessageOf(x)
    
    // Deprecated: Use CreatePasswordResp.ProtoReflect.Descriptor instead.
    func (*CreatePasswordResp) Descriptor() ([]byte, []int) {
    
    	return file_api_v2_api_proto_rawDescGZIP(), []int{11}
    
    func (x *CreatePasswordResp) GetAlreadyExists() bool {
    	if x != nil {
    		return x.AlreadyExists
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return false
    }
    
    // UpdatePasswordReq is a request to modify an existing password.
    type UpdatePasswordReq struct {
    
    	state         protoimpl.MessageState
    	sizeCache     protoimpl.SizeCache
    	unknownFields protoimpl.UnknownFields
    
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	// The email used to lookup the password. This field cannot be modified
    
    	Email       string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
    	NewHash     []byte `protobuf:"bytes,2,opt,name=new_hash,json=newHash,proto3" json:"new_hash,omitempty"`
    	NewUsername string `protobuf:"bytes,3,opt,name=new_username,json=newUsername,proto3" json:"new_username,omitempty"`
    
    func (x *UpdatePasswordReq) Reset() {
    	*x = UpdatePasswordReq{}
    	if protoimpl.UnsafeEnabled {
    
    		mi := &file_api_v2_api_proto_msgTypes[12]
    
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		ms.StoreMessageInfo(mi)
    	}
    
    func (x *UpdatePasswordReq) String() string {
    	return protoimpl.X.MessageStringOf(x)
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (*UpdatePasswordReq) ProtoMessage() {}
    
    func (x *UpdatePasswordReq) ProtoReflect() protoreflect.Message {
    
    	mi := &file_api_v2_api_proto_msgTypes[12]
    
    	if protoimpl.UnsafeEnabled && x != nil {
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		if ms.LoadMessageInfo() == nil {
    			ms.StoreMessageInfo(mi)
    		}
    		return ms
    	}
    	return mi.MessageOf(x)
    
    // Deprecated: Use UpdatePasswordReq.ProtoReflect.Descriptor instead.
    func (*UpdatePasswordReq) Descriptor() ([]byte, []int) {
    
    	return file_api_v2_api_proto_rawDescGZIP(), []int{12}
    
    func (x *UpdatePasswordReq) GetEmail() string {
    	if x != nil {
    		return x.Email
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return ""
    }
    
    
    func (x *UpdatePasswordReq) GetNewHash() []byte {
    	if x != nil {
    		return x.NewHash
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return nil
    }
    
    
    func (x *UpdatePasswordReq) GetNewUsername() string {
    	if x != nil {
    		return x.NewUsername
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return ""
    }
    
    // UpdatePasswordResp returns the response from modifying an existing password.
    type UpdatePasswordResp struct {
    
    	state         protoimpl.MessageState
    	sizeCache     protoimpl.SizeCache
    	unknownFields protoimpl.UnknownFields
    
    	NotFound bool `protobuf:"varint,1,opt,name=not_found,json=notFound,proto3" json:"not_found,omitempty"`
    
    func (x *UpdatePasswordResp) Reset() {
    	*x = UpdatePasswordResp{}
    	if protoimpl.UnsafeEnabled {
    
    		mi := &file_api_v2_api_proto_msgTypes[13]
    
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		ms.StoreMessageInfo(mi)
    	}
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (x *UpdatePasswordResp) String() string {
    	return protoimpl.X.MessageStringOf(x)
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (*UpdatePasswordResp) ProtoMessage() {}
    
    func (x *UpdatePasswordResp) ProtoReflect() protoreflect.Message {
    
    	mi := &file_api_v2_api_proto_msgTypes[13]
    
    	if protoimpl.UnsafeEnabled && x != nil {
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		if ms.LoadMessageInfo() == nil {
    			ms.StoreMessageInfo(mi)
    		}
    		return ms
    	}
    	return mi.MessageOf(x)
    
    // Deprecated: Use UpdatePasswordResp.ProtoReflect.Descriptor instead.
    func (*UpdatePasswordResp) Descriptor() ([]byte, []int) {
    
    	return file_api_v2_api_proto_rawDescGZIP(), []int{13}
    
    func (x *UpdatePasswordResp) GetNotFound() bool {
    	if x != nil {
    		return x.NotFound
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return false
    }
    
    // DeletePasswordReq is a request to delete a password.
    type DeletePasswordReq struct {
    
    	state         protoimpl.MessageState
    	sizeCache     protoimpl.SizeCache
    	unknownFields protoimpl.UnknownFields
    
    	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
    
    func (x *DeletePasswordReq) Reset() {
    	*x = DeletePasswordReq{}
    	if protoimpl.UnsafeEnabled {
    
    		mi := &file_api_v2_api_proto_msgTypes[14]
    
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		ms.StoreMessageInfo(mi)
    	}
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (x *DeletePasswordReq) String() string {
    	return protoimpl.X.MessageStringOf(x)
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (*DeletePasswordReq) ProtoMessage() {}
    
    func (x *DeletePasswordReq) ProtoReflect() protoreflect.Message {
    
    	mi := &file_api_v2_api_proto_msgTypes[14]
    
    	if protoimpl.UnsafeEnabled && x != nil {
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		if ms.LoadMessageInfo() == nil {
    			ms.StoreMessageInfo(mi)
    		}
    		return ms
    	}
    	return mi.MessageOf(x)
    
    // Deprecated: Use DeletePasswordReq.ProtoReflect.Descriptor instead.
    func (*DeletePasswordReq) Descriptor() ([]byte, []int) {
    
    	return file_api_v2_api_proto_rawDescGZIP(), []int{14}
    
    func (x *DeletePasswordReq) GetEmail() string {
    	if x != nil {
    		return x.Email
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return ""
    }
    
    // DeletePasswordResp returns the response from deleting a password.
    type DeletePasswordResp struct {
    
    	state         protoimpl.MessageState
    	sizeCache     protoimpl.SizeCache
    	unknownFields protoimpl.UnknownFields
    
    	NotFound bool `protobuf:"varint,1,opt,name=not_found,json=notFound,proto3" json:"not_found,omitempty"`
    
    func (x *DeletePasswordResp) Reset() {
    	*x = DeletePasswordResp{}
    	if protoimpl.UnsafeEnabled {
    
    		mi := &file_api_v2_api_proto_msgTypes[15]
    
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		ms.StoreMessageInfo(mi)
    	}
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (x *DeletePasswordResp) String() string {
    	return protoimpl.X.MessageStringOf(x)
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (*DeletePasswordResp) ProtoMessage() {}
    
    func (x *DeletePasswordResp) ProtoReflect() protoreflect.Message {
    
    	mi := &file_api_v2_api_proto_msgTypes[15]
    
    	if protoimpl.UnsafeEnabled && x != nil {
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		if ms.LoadMessageInfo() == nil {
    			ms.StoreMessageInfo(mi)
    		}
    		return ms
    	}
    	return mi.MessageOf(x)
    
    // Deprecated: Use DeletePasswordResp.ProtoReflect.Descriptor instead.
    func (*DeletePasswordResp) Descriptor() ([]byte, []int) {
    
    	return file_api_v2_api_proto_rawDescGZIP(), []int{15}
    
    func (x *DeletePasswordResp) GetNotFound() bool {
    	if x != nil {
    		return x.NotFound
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    	}
    	return false
    }
    
    // ListPasswordReq is a request to enumerate passwords.
    type ListPasswordReq struct {
    
    	state         protoimpl.MessageState
    	sizeCache     protoimpl.SizeCache
    	unknownFields protoimpl.UnknownFields
    
    func (x *ListPasswordReq) Reset() {
    	*x = ListPasswordReq{}
    	if protoimpl.UnsafeEnabled {
    
    		mi := &file_api_v2_api_proto_msgTypes[16]
    
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		ms.StoreMessageInfo(mi)
    	}
    
    func (x *ListPasswordReq) String() string {
    	return protoimpl.X.MessageStringOf(x)
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (*ListPasswordReq) ProtoMessage() {}
    
    func (x *ListPasswordReq) ProtoReflect() protoreflect.Message {
    
    	mi := &file_api_v2_api_proto_msgTypes[16]
    
    	if protoimpl.UnsafeEnabled && x != nil {
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		if ms.LoadMessageInfo() == nil {
    			ms.StoreMessageInfo(mi)
    		}
    		return ms
    	}
    	return mi.MessageOf(x)
    
    // Deprecated: Use ListPasswordReq.ProtoReflect.Descriptor instead.
    func (*ListPasswordReq) Descriptor() ([]byte, []int) {
    
    	return file_api_v2_api_proto_rawDescGZIP(), []int{16}
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    
    // ListPasswordResp returns a list of passwords.
    type ListPasswordResp struct {
    
    	state         protoimpl.MessageState
    	sizeCache     protoimpl.SizeCache
    	unknownFields protoimpl.UnknownFields
    
    	Passwords []*Password `protobuf:"bytes,1,rep,name=passwords,proto3" json:"passwords,omitempty"`
    
    func (x *ListPasswordResp) Reset() {
    	*x = ListPasswordResp{}
    	if protoimpl.UnsafeEnabled {
    
    		mi := &file_api_v2_api_proto_msgTypes[17]
    
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		ms.StoreMessageInfo(mi)
    	}
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (x *ListPasswordResp) String() string {
    	return protoimpl.X.MessageStringOf(x)
    
    Mark Sagi-Kazar's avatar
    Mark Sagi-Kazar committed
    }
    
    
    func (*ListPasswordResp) ProtoMessage() {}
    
    func (x *ListPasswordResp) ProtoReflect() protoreflect.Message {
    
    	mi := &file_api_v2_api_proto_msgTypes[17]
    
    	if protoimpl.UnsafeEnabled && x != nil {
    		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    		if ms.LoadMessageInfo() == nil {
    			ms.StoreMessageInfo(mi)
    		}
    		return ms
    	}
    	return mi.MessageOf(x)
    
    // Deprecated: Use ListPasswordResp.ProtoReflect.Descriptor instead.
    func (*ListPasswordResp) Descriptor() ([]byte, []int) {
    
    	return file_api_v2_api_proto_rawDescGZIP(), []int{17}