// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: provenance/metadata/v1/objectstore.proto

package types

import (
	fmt "fmt"
	_ "github.com/cosmos/cosmos-sdk/types/msgservice"
	_ "github.com/cosmos/gogoproto/gogoproto"
	proto "github.com/cosmos/gogoproto/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

// Defines an Locator object stored on chain, which represents a owner( blockchain address) associated with a endpoint
// uri for it's associated object store.
type ObjectStoreLocator struct {
	// account address the endpoint is owned by
	Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	// locator endpoint uri
	LocatorUri string `protobuf:"bytes,2,opt,name=locator_uri,json=locatorUri,proto3" json:"locator_uri,omitempty"`
	// owners encryption key address
	EncryptionKey string `protobuf:"bytes,3,opt,name=encryption_key,json=encryptionKey,proto3" json:"encryption_key,omitempty"`
}

func (m *ObjectStoreLocator) Reset()         { *m = ObjectStoreLocator{} }
func (m *ObjectStoreLocator) String() string { return proto.CompactTextString(m) }
func (*ObjectStoreLocator) ProtoMessage()    {}
func (*ObjectStoreLocator) Descriptor() ([]byte, []int) {
	return fileDescriptor_3d17fc5ccfa1c263, []int{0}
}
func (m *ObjectStoreLocator) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *ObjectStoreLocator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_ObjectStoreLocator.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 *ObjectStoreLocator) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ObjectStoreLocator.Merge(m, src)
}
func (m *ObjectStoreLocator) XXX_Size() int {
	return m.Size()
}
func (m *ObjectStoreLocator) XXX_DiscardUnknown() {
	xxx_messageInfo_ObjectStoreLocator.DiscardUnknown(m)
}

var xxx_messageInfo_ObjectStoreLocator proto.InternalMessageInfo

func (m *ObjectStoreLocator) GetOwner() string {
	if m != nil {
		return m.Owner
	}
	return ""
}

func (m *ObjectStoreLocator) GetLocatorUri() string {
	if m != nil {
		return m.LocatorUri
	}
	return ""
}

func (m *ObjectStoreLocator) GetEncryptionKey() string {
	if m != nil {
		return m.EncryptionKey
	}
	return ""
}

// Params defines the parameters for the metadata-locator module methods.
type OSLocatorParams struct {
	MaxUriLength uint32 `protobuf:"varint,1,opt,name=max_uri_length,json=maxUriLength,proto3,customtype=uint32" json:"max_uri_length"`
}

func (m *OSLocatorParams) Reset()         { *m = OSLocatorParams{} }
func (m *OSLocatorParams) String() string { return proto.CompactTextString(m) }
func (*OSLocatorParams) ProtoMessage()    {}
func (*OSLocatorParams) Descriptor() ([]byte, []int) {
	return fileDescriptor_3d17fc5ccfa1c263, []int{1}
}
func (m *OSLocatorParams) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *OSLocatorParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_OSLocatorParams.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 *OSLocatorParams) XXX_Merge(src proto.Message) {
	xxx_messageInfo_OSLocatorParams.Merge(m, src)
}
func (m *OSLocatorParams) XXX_Size() int {
	return m.Size()
}
func (m *OSLocatorParams) XXX_DiscardUnknown() {
	xxx_messageInfo_OSLocatorParams.DiscardUnknown(m)
}

var xxx_messageInfo_OSLocatorParams proto.InternalMessageInfo

func init() {
	proto.RegisterType((*ObjectStoreLocator)(nil), "provenance.metadata.v1.ObjectStoreLocator")
	proto.RegisterType((*OSLocatorParams)(nil), "provenance.metadata.v1.OSLocatorParams")
}

func init() {
	proto.RegisterFile("provenance/metadata/v1/objectstore.proto", fileDescriptor_3d17fc5ccfa1c263)
}

var fileDescriptor_3d17fc5ccfa1c263 = []byte{
	// 331 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x31, 0x4f, 0x02, 0x31,
	0x14, 0xc7, 0xef, 0x34, 0x92, 0x58, 0x05, 0x93, 0x0b, 0x51, 0x64, 0x38, 0x0c, 0x89, 0x09, 0x31,
	0xf1, 0x1a, 0x84, 0xc9, 0x91, 0xc5, 0x41, 0x12, 0x08, 0x84, 0xc5, 0x85, 0x94, 0xb3, 0x29, 0x15,
	0xda, 0x77, 0x69, 0x0b, 0x72, 0x8b, 0x83, 0x9f, 0xc0, 0x8f, 0xe2, 0xc7, 0x60, 0x64, 0x34, 0x0e,
	0xc4, 0xc0, 0xe0, 0xd7, 0x30, 0xd7, 0xc3, 0x9c, 0x83, 0xdb, 0x7b, 0xff, 0xfe, 0xde, 0xff, 0xb5,
	0xff, 0xa2, 0x5a, 0xa4, 0x60, 0x4e, 0x25, 0x91, 0x21, 0xc5, 0x82, 0x1a, 0xf2, 0x48, 0x0c, 0xc1,
	0xf3, 0x3a, 0x86, 0xd1, 0x13, 0x0d, 0x8d, 0x36, 0xa0, 0x68, 0x10, 0x29, 0x30, 0xe0, 0x9d, 0x66,
	0x64, 0xf0, 0x4b, 0x06, 0xf3, 0x7a, 0xf9, 0x2c, 0x04, 0x2d, 0x40, 0x63, 0xa1, 0x59, 0x32, 0x28,
	0x34, 0x4b, 0x07, 0xca, 0x45, 0x06, 0x0c, 0x6c, 0x89, 0x93, 0x2a, 0x55, 0xab, 0x2f, 0xc8, 0xeb,
	0x58, 0xef, 0x7e, 0xe2, 0xdd, 0x86, 0x90, 0x18, 0x50, 0x5e, 0x11, 0x1d, 0xc0, 0xb3, 0xa4, 0xaa,
	0xe4, 0x5e, 0xb8, 0xb5, 0xc3, 0x5e, 0xda, 0x78, 0x15, 0x74, 0x34, 0x4d, 0x81, 0xe1, 0x4c, 0xf1,
	0xd2, 0x9e, 0x3d, 0x43, 0x3b, 0x69, 0xa0, 0xb8, 0x77, 0x89, 0x0a, 0x54, 0x86, 0x2a, 0x8e, 0x0c,
	0x07, 0x39, 0x9c, 0xd0, 0xb8, 0xb4, 0x6f, 0x99, 0x7c, 0xa6, 0xde, 0xd3, 0xf8, 0x16, 0xbd, 0x7e,
	0xbf, 0x5f, 0xa5, 0x9e, 0xd5, 0x3b, 0x74, 0xd2, 0xe9, 0xef, 0xd6, 0x76, 0x89, 0x22, 0x42, 0x7b,
	0x4d, 0x54, 0x10, 0x64, 0x91, 0xac, 0x18, 0x4e, 0xa9, 0x64, 0x66, 0x6c, 0x6f, 0x91, 0x6f, 0x15,
	0x96, 0xeb, 0x8a, 0xf3, 0xb9, 0xae, 0xe4, 0x66, 0x5c, 0x9a, 0xc6, 0x4d, 0xef, 0x58, 0x90, 0xc5,
	0x40, 0xf1, 0xb6, 0x65, 0x5a, 0x93, 0xe5, 0xc6, 0x77, 0x57, 0x1b, 0xdf, 0xfd, 0xda, 0xf8, 0xee,
	0xdb, 0xd6, 0x77, 0x56, 0x5b, 0xdf, 0xf9, 0xd8, 0xfa, 0x0e, 0x3a, 0xe7, 0xf6, 0xb1, 0xff, 0x84,
	0xd5, 0x75, 0x1f, 0x9a, 0x8c, 0x9b, 0xf1, 0x6c, 0x14, 0x84, 0x20, 0x70, 0x06, 0x5d, 0x73, 0xf8,
	0xd3, 0xe1, 0x45, 0xf6, 0x17, 0x26, 0x8e, 0xa8, 0x1e, 0xe5, 0x6c, 0x78, 0x8d, 0x9f, 0x00, 0x00,
	0x00, 0xff, 0xff, 0x5f, 0x78, 0x72, 0x38, 0xaf, 0x01, 0x00, 0x00,
}

func (m *ObjectStoreLocator) 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 *ObjectStoreLocator) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *ObjectStoreLocator) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.EncryptionKey) > 0 {
		i -= len(m.EncryptionKey)
		copy(dAtA[i:], m.EncryptionKey)
		i = encodeVarintObjectstore(dAtA, i, uint64(len(m.EncryptionKey)))
		i--
		dAtA[i] = 0x1a
	}
	if len(m.LocatorUri) > 0 {
		i -= len(m.LocatorUri)
		copy(dAtA[i:], m.LocatorUri)
		i = encodeVarintObjectstore(dAtA, i, uint64(len(m.LocatorUri)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.Owner) > 0 {
		i -= len(m.Owner)
		copy(dAtA[i:], m.Owner)
		i = encodeVarintObjectstore(dAtA, i, uint64(len(m.Owner)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *OSLocatorParams) 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 *OSLocatorParams) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func encodeVarintObjectstore(dAtA []byte, offset int, v uint64) int {
	offset -= sovObjectstore(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *ObjectStoreLocator) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Owner)
	if l > 0 {
		n += 1 + l + sovObjectstore(uint64(l))
	}
	l = len(m.LocatorUri)
	if l > 0 {
		n += 1 + l + sovObjectstore(uint64(l))
	}
	l = len(m.EncryptionKey)
	if l > 0 {
		n += 1 + l + sovObjectstore(uint64(l))
	}
	return n
}

func (m *OSLocatorParams) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.MaxUriLength != 0 {
		n += 1 + sovObjectstore(uint64(m.MaxUriLength))
	}
	return n
}

func sovObjectstore(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozObjectstore(x uint64) (n int) {
	return sovObjectstore(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *ObjectStoreLocator) 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 ErrIntOverflowObjectstore
			}
			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: ObjectStoreLocator: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: ObjectStoreLocator: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowObjectstore
				}
				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 ErrInvalidLengthObjectstore
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthObjectstore
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Owner = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field LocatorUri", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowObjectstore
				}
				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 ErrInvalidLengthObjectstore
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthObjectstore
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.LocatorUri = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field EncryptionKey", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowObjectstore
				}
				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 ErrInvalidLengthObjectstore
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthObjectstore
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.EncryptionKey = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipObjectstore(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthObjectstore
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *OSLocatorParams) 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 ErrIntOverflowObjectstore
			}
			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: OSLocatorParams: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: OSLocatorParams: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field MaxUriLength", wireType)
			}
			m.MaxUriLength = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowObjectstore
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.MaxUriLength |= uint32(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipObjectstore(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthObjectstore
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipObjectstore(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, ErrIntOverflowObjectstore
			}
			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, ErrIntOverflowObjectstore
				}
				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, ErrIntOverflowObjectstore
				}
				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, ErrInvalidLengthObjectstore
			}
			iNdEx += length
		case 3:
			depth++
		case 4:
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupObjectstore
			}
			depth--
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
		if iNdEx < 0 {
			return 0, ErrInvalidLengthObjectstore
		}
		if depth == 0 {
			return iNdEx, nil
		}
	}
	return 0, io.ErrUnexpectedEOF
}

var (
	ErrInvalidLengthObjectstore        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowObjectstore          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupObjectstore = fmt.Errorf("proto: unexpected end of group")
)
