// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: axelar/tss/tofnd/v1beta1/common.proto

package tofnd

import (
	fmt "fmt"
	_ "github.com/gogo/protobuf/gogoproto"
	proto "github.com/gogo/protobuf/proto"
	io "io"
	math "math"
	math_bits "math/bits"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package

type KeyPresenceResponse_Response int32

const (
	RESPONSE_UNSPECIFIED KeyPresenceResponse_Response = 0
	RESPONSE_PRESENT     KeyPresenceResponse_Response = 1
	RESPONSE_ABSENT      KeyPresenceResponse_Response = 2
	RESPONSE_FAIL        KeyPresenceResponse_Response = 3
)

var KeyPresenceResponse_Response_name = map[int32]string{
	0: "RESPONSE_UNSPECIFIED",
	1: "RESPONSE_PRESENT",
	2: "RESPONSE_ABSENT",
	3: "RESPONSE_FAIL",
}

var KeyPresenceResponse_Response_value = map[string]int32{
	"RESPONSE_UNSPECIFIED": 0,
	"RESPONSE_PRESENT":     1,
	"RESPONSE_ABSENT":      2,
	"RESPONSE_FAIL":        3,
}

func (x KeyPresenceResponse_Response) String() string {
	return proto.EnumName(KeyPresenceResponse_Response_name, int32(x))
}

func (KeyPresenceResponse_Response) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_2135c62cb28b1f56, []int{1, 0}
}

// Key presence check types
type KeyPresenceRequest struct {
	KeyUid string `protobuf:"bytes,1,opt,name=key_uid,json=keyUid,proto3" json:"key_uid,omitempty"`
	PubKey []byte `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"`
}

func (m *KeyPresenceRequest) Reset()         { *m = KeyPresenceRequest{} }
func (m *KeyPresenceRequest) String() string { return proto.CompactTextString(m) }
func (*KeyPresenceRequest) ProtoMessage()    {}
func (*KeyPresenceRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_2135c62cb28b1f56, []int{0}
}
func (m *KeyPresenceRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *KeyPresenceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_KeyPresenceRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *KeyPresenceRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_KeyPresenceRequest.Merge(m, src)
}
func (m *KeyPresenceRequest) XXX_Size() int {
	return m.Size()
}
func (m *KeyPresenceRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_KeyPresenceRequest.DiscardUnknown(m)
}

var xxx_messageInfo_KeyPresenceRequest proto.InternalMessageInfo

func (m *KeyPresenceRequest) GetKeyUid() string {
	if m != nil {
		return m.KeyUid
	}
	return ""
}

func (m *KeyPresenceRequest) GetPubKey() []byte {
	if m != nil {
		return m.PubKey
	}
	return nil
}

type KeyPresenceResponse struct {
	Response KeyPresenceResponse_Response `protobuf:"varint,1,opt,name=response,proto3,enum=axelar.tss.tofnd.v1beta1.KeyPresenceResponse_Response" json:"response,omitempty"`
}

func (m *KeyPresenceResponse) Reset()         { *m = KeyPresenceResponse{} }
func (m *KeyPresenceResponse) String() string { return proto.CompactTextString(m) }
func (*KeyPresenceResponse) ProtoMessage()    {}
func (*KeyPresenceResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_2135c62cb28b1f56, []int{1}
}
func (m *KeyPresenceResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *KeyPresenceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_KeyPresenceResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *KeyPresenceResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_KeyPresenceResponse.Merge(m, src)
}
func (m *KeyPresenceResponse) XXX_Size() int {
	return m.Size()
}
func (m *KeyPresenceResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_KeyPresenceResponse.DiscardUnknown(m)
}

var xxx_messageInfo_KeyPresenceResponse proto.InternalMessageInfo

func (m *KeyPresenceResponse) GetResponse() KeyPresenceResponse_Response {
	if m != nil {
		return m.Response
	}
	return RESPONSE_UNSPECIFIED
}

func init() {
	proto.RegisterEnum("axelar.tss.tofnd.v1beta1.KeyPresenceResponse_Response", KeyPresenceResponse_Response_name, KeyPresenceResponse_Response_value)
	proto.RegisterType((*KeyPresenceRequest)(nil), "axelar.tss.tofnd.v1beta1.KeyPresenceRequest")
	proto.RegisterType((*KeyPresenceResponse)(nil), "axelar.tss.tofnd.v1beta1.KeyPresenceResponse")
}

func init() {
	proto.RegisterFile("axelar/tss/tofnd/v1beta1/common.proto", fileDescriptor_2135c62cb28b1f56)
}

var fileDescriptor_2135c62cb28b1f56 = []byte{
	// 339 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4d, 0xac, 0x48, 0xcd,
	0x49, 0x2c, 0xd2, 0x2f, 0x29, 0x2e, 0xd6, 0x2f, 0xc9, 0x4f, 0xcb, 0x4b, 0xd1, 0x2f, 0x33, 0x4c,
	0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0xce, 0xcf, 0xcd, 0xcd, 0xcf, 0xd3, 0x2b, 0x28, 0xca, 0x2f,
	0xc9, 0x17, 0x92, 0x80, 0x28, 0xd3, 0x2b, 0x29, 0x2e, 0xd6, 0x03, 0x2b, 0xd3, 0x83, 0x2a, 0x93,
	0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b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 0x63,
	0xb1, 0x1c, 0x83, 0x93, 0xd7, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24,
	0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x19,
	0xa4, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x43, 0xfc, 0x93, 0x97, 0x5a,
	0x52, 0x9e, 0x5f, 0x94, 0x0d, 0xe5, 0xe9, 0x26, 0xe7, 0x17, 0xa5, 0xea, 0x57, 0x20, 0xa2, 0x2b,
	0x89, 0x0d, 0x1c, 0xe0, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x72, 0xff, 0x7b, 0x65, 0xc9,
	0x01, 0x00, 0x00,
}

func (m *KeyPresenceRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *KeyPresenceRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *KeyPresenceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.PubKey) > 0 {
		i -= len(m.PubKey)
		copy(dAtA[i:], m.PubKey)
		i = encodeVarintCommon(dAtA, i, uint64(len(m.PubKey)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.KeyUid) > 0 {
		i -= len(m.KeyUid)
		copy(dAtA[i:], m.KeyUid)
		i = encodeVarintCommon(dAtA, i, uint64(len(m.KeyUid)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *KeyPresenceResponse) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *KeyPresenceResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *KeyPresenceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Response != 0 {
		i = encodeVarintCommon(dAtA, i, uint64(m.Response))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

func encodeVarintCommon(dAtA []byte, offset int, v uint64) int {
	offset -= sovCommon(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *KeyPresenceRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.KeyUid)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	l = len(m.PubKey)
	if l > 0 {
		n += 1 + l + sovCommon(uint64(l))
	}
	return n
}

func (m *KeyPresenceResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Response != 0 {
		n += 1 + sovCommon(uint64(m.Response))
	}
	return n
}

func sovCommon(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozCommon(x uint64) (n int) {
	return sovCommon(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *KeyPresenceRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowCommon
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: KeyPresenceRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: KeyPresenceRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field KeyUid", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthCommon
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.KeyUid = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthCommon
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthCommon
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.PubKey = append(m.PubKey[:0], dAtA[iNdEx:postIndex]...)
			if m.PubKey == nil {
				m.PubKey = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipCommon(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthCommon
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *KeyPresenceResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowCommon
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: KeyPresenceResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: KeyPresenceResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType)
			}
			m.Response = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Response |= KeyPresenceResponse_Response(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipCommon(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthCommon
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipCommon(dAtA []byte) (n int, err error) {
	l := len(dAtA)
	iNdEx := 0
	depth := 0
	for iNdEx < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return 0, ErrIntOverflowCommon
			}
			if iNdEx >= l {
				return 0, io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		wireType := int(wire & 0x7)
		switch wireType {
		case 0:
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				iNdEx++
				if dAtA[iNdEx-1] < 0x80 {
					break
				}
			}
		case 1:
			iNdEx += 8
		case 2:
			var length int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowCommon
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				length |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if length < 0 {
				return 0, ErrInvalidLengthCommon
			}
			iNdEx += length
		case 3:
			depth++
		case 4:
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupCommon
			}
			depth--
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
		if iNdEx < 0 {
			return 0, ErrInvalidLengthCommon
		}
		if depth == 0 {
			return iNdEx, nil
		}
	}
	return 0, io.ErrUnexpectedEOF
}

var (
	ErrInvalidLengthCommon        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCommon          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupCommon = fmt.Errorf("proto: unexpected end of group")
)
