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

package types

import (
	fmt "fmt"
	github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
	_ "github.com/cosmos/gogoproto/gogoproto"
	proto "github.com/cosmos/gogoproto/proto"
	io "io"
	math "math"
	math_bits "math/bits"
	reflect "reflect"
	strings "strings"
)

// 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

// DefinitionType indicates the required definition type for this value
type DefinitionType int32

const (
	// DEFINITION_TYPE_UNSPECIFIED indicates an unknown/invalid value
	DefinitionType_DEFINITION_TYPE_UNSPECIFIED DefinitionType = 0
	// DEFINITION_TYPE_PROPOSED indicates a proposed value is used here (a record that is not on-chain)
	DefinitionType_DEFINITION_TYPE_PROPOSED DefinitionType = 1
	// DEFINITION_TYPE_RECORD indicates the value must be a reference to a record on chain
	DefinitionType_DEFINITION_TYPE_RECORD DefinitionType = 2
	// DEFINITION_TYPE_RECORD_LIST indicates the value maybe a reference to a collection of values on chain having
	// the same name
	DefinitionType_DEFINITION_TYPE_RECORD_LIST DefinitionType = 3
)

var DefinitionType_name = map[int32]string{
	0: "DEFINITION_TYPE_UNSPECIFIED",
	1: "DEFINITION_TYPE_PROPOSED",
	2: "DEFINITION_TYPE_RECORD",
	3: "DEFINITION_TYPE_RECORD_LIST",
}

var DefinitionType_value = map[string]int32{
	"DEFINITION_TYPE_UNSPECIFIED": 0,
	"DEFINITION_TYPE_PROPOSED":    1,
	"DEFINITION_TYPE_RECORD":      2,
	"DEFINITION_TYPE_RECORD_LIST": 3,
}

func (x DefinitionType) String() string {
	return proto.EnumName(DefinitionType_name, int32(x))
}

func (DefinitionType) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_1e2d1042057ea889, []int{0}
}

// PartyType are the different roles parties on a contract may use
type PartyType int32

const (
	// PARTY_TYPE_UNSPECIFIED is an error condition
	PartyType_PARTY_TYPE_UNSPECIFIED PartyType = 0
	// PARTY_TYPE_ORIGINATOR is an asset originator
	PartyType_PARTY_TYPE_ORIGINATOR PartyType = 1
	// PARTY_TYPE_SERVICER provides debt servicing functions
	PartyType_PARTY_TYPE_SERVICER PartyType = 2
	// PARTY_TYPE_INVESTOR is a generic investor
	PartyType_PARTY_TYPE_INVESTOR PartyType = 3
	// PARTY_TYPE_CUSTODIAN is an entity that provides custodian services for assets
	PartyType_PARTY_TYPE_CUSTODIAN PartyType = 4
	// PARTY_TYPE_OWNER indicates this party is an owner of the item
	PartyType_PARTY_TYPE_OWNER PartyType = 5
	// PARTY_TYPE_AFFILIATE is a party with an affiliate agreement
	PartyType_PARTY_TYPE_AFFILIATE PartyType = 6
	// PARTY_TYPE_OMNIBUS is a special type of party that controls an omnibus bank account
	PartyType_PARTY_TYPE_OMNIBUS PartyType = 7
	// PARTY_TYPE_PROVENANCE is used to indicate this party represents the blockchain or a smart contract action
	PartyType_PARTY_TYPE_PROVENANCE PartyType = 8
	// PARTY_TYPE_CONTROLLER is an entity which controls a specific asset on chain (ie enote)
	PartyType_PARTY_TYPE_CONTROLLER PartyType = 10
	// PARTY_TYPE_VALIDATOR is an entity which validates given assets on chain
	PartyType_PARTY_TYPE_VALIDATOR PartyType = 11
	// PARTY_TYPE_GENERIC_1 are placeholder types for the user-defined role.
	PartyType_PARTY_TYPE_GENERIC_1 PartyType = 12
	// PARTY_TYPE_GENERIC_2 are placeholder types for the user-defined role.
	PartyType_PARTY_TYPE_GENERIC_2 PartyType = 13
	// PARTY_TYPE_GENERIC_3 are placeholder types for the user-defined role.
	PartyType_PARTY_TYPE_GENERIC_3 PartyType = 14
	// PARTY_TYPE_GENERIC_4 are placeholder types for the user-defined role.
	PartyType_PARTY_TYPE_GENERIC_4 PartyType = 15
	// PARTY_TYPE_GENERIC_5 are placeholder types for the user-defined role.
	PartyType_PARTY_TYPE_GENERIC_5 PartyType = 16
	// PARTY_TYPE_GENERIC_6 are placeholder types for the user-defined role.
	PartyType_PARTY_TYPE_GENERIC_6 PartyType = 17
)

var PartyType_name = map[int32]string{
	0:  "PARTY_TYPE_UNSPECIFIED",
	1:  "PARTY_TYPE_ORIGINATOR",
	2:  "PARTY_TYPE_SERVICER",
	3:  "PARTY_TYPE_INVESTOR",
	4:  "PARTY_TYPE_CUSTODIAN",
	5:  "PARTY_TYPE_OWNER",
	6:  "PARTY_TYPE_AFFILIATE",
	7:  "PARTY_TYPE_OMNIBUS",
	8:  "PARTY_TYPE_PROVENANCE",
	10: "PARTY_TYPE_CONTROLLER",
	11: "PARTY_TYPE_VALIDATOR",
	12: "PARTY_TYPE_GENERIC_1",
	13: "PARTY_TYPE_GENERIC_2",
	14: "PARTY_TYPE_GENERIC_3",
	15: "PARTY_TYPE_GENERIC_4",
	16: "PARTY_TYPE_GENERIC_5",
	17: "PARTY_TYPE_GENERIC_6",
}

var PartyType_value = map[string]int32{
	"PARTY_TYPE_UNSPECIFIED": 0,
	"PARTY_TYPE_ORIGINATOR":  1,
	"PARTY_TYPE_SERVICER":    2,
	"PARTY_TYPE_INVESTOR":    3,
	"PARTY_TYPE_CUSTODIAN":   4,
	"PARTY_TYPE_OWNER":       5,
	"PARTY_TYPE_AFFILIATE":   6,
	"PARTY_TYPE_OMNIBUS":     7,
	"PARTY_TYPE_PROVENANCE":  8,
	"PARTY_TYPE_CONTROLLER":  10,
	"PARTY_TYPE_VALIDATOR":   11,
	"PARTY_TYPE_GENERIC_1":   12,
	"PARTY_TYPE_GENERIC_2":   13,
	"PARTY_TYPE_GENERIC_3":   14,
	"PARTY_TYPE_GENERIC_4":   15,
	"PARTY_TYPE_GENERIC_5":   16,
	"PARTY_TYPE_GENERIC_6":   17,
}

func (x PartyType) String() string {
	return proto.EnumName(PartyType_name, int32(x))
}

func (PartyType) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_1e2d1042057ea889, []int{1}
}

// ScopeSpecification defines the required parties, resources, conditions, and consideration outputs for a contract
type ScopeSpecification struct {
	// unique identifier for this specification on chain
	SpecificationId MetadataAddress `protobuf:"bytes,1,opt,name=specification_id,json=specificationId,proto3,customtype=MetadataAddress" json:"specification_id"`
	// General information about this scope specification.
	Description *Description `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// Addresses of the owners of this scope specification.
	OwnerAddresses []string `protobuf:"bytes,3,rep,name=owner_addresses,json=ownerAddresses,proto3" json:"owner_addresses,omitempty"`
	// A list of parties that must be present on a scope (and their associated roles)
	PartiesInvolved []PartyType `protobuf:"varint,4,rep,packed,name=parties_involved,json=partiesInvolved,proto3,enum=provenance.metadata.v1.PartyType" json:"parties_involved,omitempty"`
	// A list of contract specification ids allowed for a scope based on this specification.
	ContractSpecIds []MetadataAddress `protobuf:"bytes,5,rep,name=contract_spec_ids,json=contractSpecIds,proto3,customtype=MetadataAddress" json:"contract_spec_ids"`
}

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

var xxx_messageInfo_ScopeSpecification proto.InternalMessageInfo

func (m *ScopeSpecification) GetDescription() *Description {
	if m != nil {
		return m.Description
	}
	return nil
}

func (m *ScopeSpecification) GetOwnerAddresses() []string {
	if m != nil {
		return m.OwnerAddresses
	}
	return nil
}

func (m *ScopeSpecification) GetPartiesInvolved() []PartyType {
	if m != nil {
		return m.PartiesInvolved
	}
	return nil
}

// ContractSpecification defines the required parties, resources, conditions, and consideration outputs for a contract
type ContractSpecification struct {
	// unique identifier for this specification on chain
	SpecificationId MetadataAddress `protobuf:"bytes,1,opt,name=specification_id,json=specificationId,proto3,customtype=MetadataAddress" json:"specification_id"`
	// Description information for this contract specification
	Description *Description `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// Address of the account that owns this specificaiton
	OwnerAddresses []string `protobuf:"bytes,3,rep,name=owner_addresses,json=ownerAddresses,proto3" json:"owner_addresses,omitempty"`
	// a list of party roles that must be fullfilled when signing a transaction for this contract specification
	PartiesInvolved []PartyType `protobuf:"varint,4,rep,packed,name=parties_involved,json=partiesInvolved,proto3,enum=provenance.metadata.v1.PartyType" json:"parties_involved,omitempty"`
	// Reference to a metadata record with a hash and type information for the instance of code that will process this
	// contract
	//
	// Types that are valid to be assigned to Source:
	//
	//	*ContractSpecification_ResourceId
	//	*ContractSpecification_Hash
	Source isContractSpecification_Source `protobuf_oneof:"source"`
	// name of the class/type of this contract executable
	ClassName string `protobuf:"bytes,7,opt,name=class_name,json=className,proto3" json:"class_name,omitempty"`
}

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

var xxx_messageInfo_ContractSpecification proto.InternalMessageInfo

type isContractSpecification_Source interface {
	isContractSpecification_Source()
	MarshalTo([]byte) (int, error)
	Size() int
}

type ContractSpecification_ResourceId struct {
	ResourceId github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,5,opt,name=resource_id,json=resourceId,proto3,oneof,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"resource_id,omitempty"`
}
type ContractSpecification_Hash struct {
	Hash string `protobuf:"bytes,6,opt,name=hash,proto3,oneof" json:"hash,omitempty"`
}

func (*ContractSpecification_ResourceId) isContractSpecification_Source() {}
func (*ContractSpecification_Hash) isContractSpecification_Source()       {}

func (m *ContractSpecification) GetSource() isContractSpecification_Source {
	if m != nil {
		return m.Source
	}
	return nil
}

func (m *ContractSpecification) GetDescription() *Description {
	if m != nil {
		return m.Description
	}
	return nil
}

func (m *ContractSpecification) GetOwnerAddresses() []string {
	if m != nil {
		return m.OwnerAddresses
	}
	return nil
}

func (m *ContractSpecification) GetPartiesInvolved() []PartyType {
	if m != nil {
		return m.PartiesInvolved
	}
	return nil
}

func (m *ContractSpecification) GetResourceId() github_com_cosmos_cosmos_sdk_types.AccAddress {
	if x, ok := m.GetSource().(*ContractSpecification_ResourceId); ok {
		return x.ResourceId
	}
	return nil
}

func (m *ContractSpecification) GetHash() string {
	if x, ok := m.GetSource().(*ContractSpecification_Hash); ok {
		return x.Hash
	}
	return ""
}

func (m *ContractSpecification) GetClassName() string {
	if m != nil {
		return m.ClassName
	}
	return ""
}

// XXX_OneofWrappers is for the internal use of the proto package.
func (*ContractSpecification) XXX_OneofWrappers() []interface{} {
	return []interface{}{
		(*ContractSpecification_ResourceId)(nil),
		(*ContractSpecification_Hash)(nil),
	}
}

// RecordSpecification defines the specification for a Record including allowed/required inputs/outputs
type RecordSpecification struct {
	// unique identifier for this specification on chain
	SpecificationId MetadataAddress `protobuf:"bytes,1,opt,name=specification_id,json=specificationId,proto3,customtype=MetadataAddress" json:"specification_id"`
	// Name of Record that will be created when this specification is used
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// A set of inputs that must be satisified to apply this RecordSpecification and create a Record
	Inputs []*InputSpecification `protobuf:"bytes,3,rep,name=inputs,proto3" json:"inputs,omitempty"`
	// A type name for data associated with this record (typically a class or proto name)
	TypeName string `protobuf:"bytes,4,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
	// Type of result for this record specification (must be RECORD or RECORD_LIST)
	ResultType DefinitionType `protobuf:"varint,5,opt,name=result_type,json=resultType,proto3,enum=provenance.metadata.v1.DefinitionType" json:"result_type,omitempty"`
	// Type of party responsible for this record
	ResponsibleParties []PartyType `protobuf:"varint,6,rep,packed,name=responsible_parties,json=responsibleParties,proto3,enum=provenance.metadata.v1.PartyType" json:"responsible_parties,omitempty"`
}

func (m *RecordSpecification) Reset()      { *m = RecordSpecification{} }
func (*RecordSpecification) ProtoMessage() {}
func (*RecordSpecification) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2d1042057ea889, []int{2}
}
func (m *RecordSpecification) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *RecordSpecification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_RecordSpecification.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 *RecordSpecification) XXX_Merge(src proto.Message) {
	xxx_messageInfo_RecordSpecification.Merge(m, src)
}
func (m *RecordSpecification) XXX_Size() int {
	return m.Size()
}
func (m *RecordSpecification) XXX_DiscardUnknown() {
	xxx_messageInfo_RecordSpecification.DiscardUnknown(m)
}

var xxx_messageInfo_RecordSpecification proto.InternalMessageInfo

func (m *RecordSpecification) GetName() string {
	if m != nil {
		return m.Name
	}
	return ""
}

func (m *RecordSpecification) GetInputs() []*InputSpecification {
	if m != nil {
		return m.Inputs
	}
	return nil
}

func (m *RecordSpecification) GetTypeName() string {
	if m != nil {
		return m.TypeName
	}
	return ""
}

func (m *RecordSpecification) GetResultType() DefinitionType {
	if m != nil {
		return m.ResultType
	}
	return DefinitionType_DEFINITION_TYPE_UNSPECIFIED
}

func (m *RecordSpecification) GetResponsibleParties() []PartyType {
	if m != nil {
		return m.ResponsibleParties
	}
	return nil
}

// InputSpecification defines a name, type_name, and source reference (either on or off chain) to define an input
// parameter
type InputSpecification struct {
	// name for this input
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// a type_name (typically a proto name or class_name)
	TypeName string `protobuf:"bytes,2,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
	// source is either on chain (record_id) or off-chain (hash)
	//
	// Types that are valid to be assigned to Source:
	//
	//	*InputSpecification_RecordId
	//	*InputSpecification_Hash
	Source isInputSpecification_Source `protobuf_oneof:"source"`
}

func (m *InputSpecification) Reset()      { *m = InputSpecification{} }
func (*InputSpecification) ProtoMessage() {}
func (*InputSpecification) Descriptor() ([]byte, []int) {
	return fileDescriptor_1e2d1042057ea889, []int{3}
}
func (m *InputSpecification) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *InputSpecification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_InputSpecification.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 *InputSpecification) XXX_Merge(src proto.Message) {
	xxx_messageInfo_InputSpecification.Merge(m, src)
}
func (m *InputSpecification) XXX_Size() int {
	return m.Size()
}
func (m *InputSpecification) XXX_DiscardUnknown() {
	xxx_messageInfo_InputSpecification.DiscardUnknown(m)
}

var xxx_messageInfo_InputSpecification proto.InternalMessageInfo

type isInputSpecification_Source interface {
	isInputSpecification_Source()
	MarshalTo([]byte) (int, error)
	Size() int
}

type InputSpecification_RecordId struct {
	RecordId MetadataAddress `protobuf:"bytes,3,opt,name=record_id,json=recordId,proto3,oneof,customtype=MetadataAddress" json:"record_id,omitempty"`
}
type InputSpecification_Hash struct {
	Hash string `protobuf:"bytes,4,opt,name=hash,proto3,oneof" json:"hash,omitempty"`
}

func (*InputSpecification_RecordId) isInputSpecification_Source() {}
func (*InputSpecification_Hash) isInputSpecification_Source()     {}

func (m *InputSpecification) GetSource() isInputSpecification_Source {
	if m != nil {
		return m.Source
	}
	return nil
}

func (m *InputSpecification) GetName() string {
	if m != nil {
		return m.Name
	}
	return ""
}

func (m *InputSpecification) GetTypeName() string {
	if m != nil {
		return m.TypeName
	}
	return ""
}

func (m *InputSpecification) GetHash() string {
	if x, ok := m.GetSource().(*InputSpecification_Hash); ok {
		return x.Hash
	}
	return ""
}

// XXX_OneofWrappers is for the internal use of the proto package.
func (*InputSpecification) XXX_OneofWrappers() []interface{} {
	return []interface{}{
		(*InputSpecification_RecordId)(nil),
		(*InputSpecification_Hash)(nil),
	}
}

// Description holds general information that is handy to associate with a structure.
type Description struct {
	// A Name for this thing.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// A description of this thing.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// URL to find even more info.
	WebsiteUrl string `protobuf:"bytes,4,opt,name=website_url,json=websiteUrl,proto3" json:"website_url,omitempty"`
	// URL of an icon.
	IconUrl string `protobuf:"bytes,5,opt,name=icon_url,json=iconUrl,proto3" json:"icon_url,omitempty"`
}

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

var xxx_messageInfo_Description proto.InternalMessageInfo

func (m *Description) GetName() string {
	if m != nil {
		return m.Name
	}
	return ""
}

func (m *Description) GetDescription() string {
	if m != nil {
		return m.Description
	}
	return ""
}

func (m *Description) GetWebsiteUrl() string {
	if m != nil {
		return m.WebsiteUrl
	}
	return ""
}

func (m *Description) GetIconUrl() string {
	if m != nil {
		return m.IconUrl
	}
	return ""
}

func init() {
	proto.RegisterEnum("provenance.metadata.v1.DefinitionType", DefinitionType_name, DefinitionType_value)
	proto.RegisterEnum("provenance.metadata.v1.PartyType", PartyType_name, PartyType_value)
	proto.RegisterType((*ScopeSpecification)(nil), "provenance.metadata.v1.ScopeSpecification")
	proto.RegisterType((*ContractSpecification)(nil), "provenance.metadata.v1.ContractSpecification")
	proto.RegisterType((*RecordSpecification)(nil), "provenance.metadata.v1.RecordSpecification")
	proto.RegisterType((*InputSpecification)(nil), "provenance.metadata.v1.InputSpecification")
	proto.RegisterType((*Description)(nil), "provenance.metadata.v1.Description")
}

func init() {
	proto.RegisterFile("provenance/metadata/v1/specification.proto", fileDescriptor_1e2d1042057ea889)
}

var fileDescriptor_1e2d1042057ea889 = []byte{
	// 932 bytes of a gzipped FileDescriptorPro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,
	0x9f, 0xe7, 0xc5, 0x97, 0xc8, 0x93, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x69, 0xf6, 0xec,
	0xe5, 0x08, 0x00, 0x00,
}

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

func (m *ScopeSpecification) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.ContractSpecIds) > 0 {
		for iNdEx := len(m.ContractSpecIds) - 1; iNdEx >= 0; iNdEx-- {
			{
				size := m.ContractSpecIds[iNdEx].Size()
				i -= size
				if _, err := m.ContractSpecIds[iNdEx].MarshalTo(dAtA[i:]); err != nil {
					return 0, err
				}
				i = encodeVarintSpecification(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0x2a
		}
	}
	if len(m.PartiesInvolved) > 0 {
		dAtA2 := make([]byte, len(m.PartiesInvolved)*10)
		var j1 int
		for _, num := range m.PartiesInvolved {
			for num >= 1<<7 {
				dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80)
				num >>= 7
				j1++
			}
			dAtA2[j1] = uint8(num)
			j1++
		}
		i -= j1
		copy(dAtA[i:], dAtA2[:j1])
		i = encodeVarintSpecification(dAtA, i, uint64(j1))
		i--
		dAtA[i] = 0x22
	}
	if len(m.OwnerAddresses) > 0 {
		for iNdEx := len(m.OwnerAddresses) - 1; iNdEx >= 0; iNdEx-- {
			i -= len(m.OwnerAddresses[iNdEx])
			copy(dAtA[i:], m.OwnerAddresses[iNdEx])
			i = encodeVarintSpecification(dAtA, i, uint64(len(m.OwnerAddresses[iNdEx])))
			i--
			dAtA[i] = 0x1a
		}
	}
	if m.Description != nil {
		{
			size, err := m.Description.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintSpecification(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x12
	}
	{
		size := m.SpecificationId.Size()
		i -= size
		if _, err := m.SpecificationId.MarshalTo(dAtA[i:]); err != nil {
			return 0, err
		}
		i = encodeVarintSpecification(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
}

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

func (m *ContractSpecification) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.ClassName) > 0 {
		i -= len(m.ClassName)
		copy(dAtA[i:], m.ClassName)
		i = encodeVarintSpecification(dAtA, i, uint64(len(m.ClassName)))
		i--
		dAtA[i] = 0x3a
	}
	if m.Source != nil {
		{
			size := m.Source.Size()
			i -= size
			if _, err := m.Source.MarshalTo(dAtA[i:]); err != nil {
				return 0, err
			}
		}
	}
	if len(m.PartiesInvolved) > 0 {
		dAtA5 := make([]byte, len(m.PartiesInvolved)*10)
		var j4 int
		for _, num := range m.PartiesInvolved {
			for num >= 1<<7 {
				dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80)
				num >>= 7
				j4++
			}
			dAtA5[j4] = uint8(num)
			j4++
		}
		i -= j4
		copy(dAtA[i:], dAtA5[:j4])
		i = encodeVarintSpecification(dAtA, i, uint64(j4))
		i--
		dAtA[i] = 0x22
	}
	if len(m.OwnerAddresses) > 0 {
		for iNdEx := len(m.OwnerAddresses) - 1; iNdEx >= 0; iNdEx-- {
			i -= len(m.OwnerAddresses[iNdEx])
			copy(dAtA[i:], m.OwnerAddresses[iNdEx])
			i = encodeVarintSpecification(dAtA, i, uint64(len(m.OwnerAddresses[iNdEx])))
			i--
			dAtA[i] = 0x1a
		}
	}
	if m.Description != nil {
		{
			size, err := m.Description.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintSpecification(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x12
	}
	{
		size := m.SpecificationId.Size()
		i -= size
		if _, err := m.SpecificationId.MarshalTo(dAtA[i:]); err != nil {
			return 0, err
		}
		i = encodeVarintSpecification(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
}

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

func (m *ContractSpecification_ResourceId) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.ResourceId != nil {
		i -= len(m.ResourceId)
		copy(dAtA[i:], m.ResourceId)
		i = encodeVarintSpecification(dAtA, i, uint64(len(m.ResourceId)))
		i--
		dAtA[i] = 0x2a
	}
	return len(dAtA) - i, nil
}
func (m *ContractSpecification_Hash) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *ContractSpecification_Hash) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	i -= len(m.Hash)
	copy(dAtA[i:], m.Hash)
	i = encodeVarintSpecification(dAtA, i, uint64(len(m.Hash)))
	i--
	dAtA[i] = 0x32
	return len(dAtA) - i, nil
}
func (m *RecordSpecification) 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 *RecordSpecification) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *RecordSpecification) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.ResponsibleParties) > 0 {
		dAtA8 := make([]byte, len(m.ResponsibleParties)*10)
		var j7 int
		for _, num := range m.ResponsibleParties {
			for num >= 1<<7 {
				dAtA8[j7] = uint8(uint64(num)&0x7f | 0x80)
				num >>= 7
				j7++
			}
			dAtA8[j7] = uint8(num)
			j7++
		}
		i -= j7
		copy(dAtA[i:], dAtA8[:j7])
		i = encodeVarintSpecification(dAtA, i, uint64(j7))
		i--
		dAtA[i] = 0x32
	}
	if m.ResultType != 0 {
		i = encodeVarintSpecification(dAtA, i, uint64(m.ResultType))
		i--
		dAtA[i] = 0x28
	}
	if len(m.TypeName) > 0 {
		i -= len(m.TypeName)
		copy(dAtA[i:], m.TypeName)
		i = encodeVarintSpecification(dAtA, i, uint64(len(m.TypeName)))
		i--
		dAtA[i] = 0x22
	}
	if len(m.Inputs) > 0 {
		for iNdEx := len(m.Inputs) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.Inputs[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintSpecification(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0x1a
		}
	}
	if len(m.Name) > 0 {
		i -= len(m.Name)
		copy(dAtA[i:], m.Name)
		i = encodeVarintSpecification(dAtA, i, uint64(len(m.Name)))
		i--
		dAtA[i] = 0x12
	}
	{
		size := m.SpecificationId.Size()
		i -= size
		if _, err := m.SpecificationId.MarshalTo(dAtA[i:]); err != nil {
			return 0, err
		}
		i = encodeVarintSpecification(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
}

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

func (m *InputSpecification) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Source != nil {
		{
			size := m.Source.Size()
			i -= size
			if _, err := m.Source.MarshalTo(dAtA[i:]); err != nil {
				return 0, err
			}
		}
	}
	if len(m.TypeName) > 0 {
		i -= len(m.TypeName)
		copy(dAtA[i:], m.TypeName)
		i = encodeVarintSpecification(dAtA, i, uint64(len(m.TypeName)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.Name) > 0 {
		i -= len(m.Name)
		copy(dAtA[i:], m.Name)
		i = encodeVarintSpecification(dAtA, i, uint64(len(m.Name)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

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

func (m *InputSpecification_RecordId) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	{
		size := m.RecordId.Size()
		i -= size
		if _, err := m.RecordId.MarshalTo(dAtA[i:]); err != nil {
			return 0, err
		}
		i = encodeVarintSpecification(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x1a
	return len(dAtA) - i, nil
}
func (m *InputSpecification_Hash) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *InputSpecification_Hash) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	i -= len(m.Hash)
	copy(dAtA[i:], m.Hash)
	i = encodeVarintSpecification(dAtA, i, uint64(len(m.Hash)))
	i--
	dAtA[i] = 0x22
	return len(dAtA) - i, nil
}
func (m *Description) 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 *Description) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *Description) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.IconUrl) > 0 {
		i -= len(m.IconUrl)
		copy(dAtA[i:], m.IconUrl)
		i = encodeVarintSpecification(dAtA, i, uint64(len(m.IconUrl)))
		i--
		dAtA[i] = 0x2a
	}
	if len(m.WebsiteUrl) > 0 {
		i -= len(m.WebsiteUrl)
		copy(dAtA[i:], m.WebsiteUrl)
		i = encodeVarintSpecification(dAtA, i, uint64(len(m.WebsiteUrl)))
		i--
		dAtA[i] = 0x22
	}
	if len(m.Description) > 0 {
		i -= len(m.Description)
		copy(dAtA[i:], m.Description)
		i = encodeVarintSpecification(dAtA, i, uint64(len(m.Description)))
		i--
		dAtA[i] = 0x1a
	}
	if len(m.Name) > 0 {
		i -= len(m.Name)
		copy(dAtA[i:], m.Name)
		i = encodeVarintSpecification(dAtA, i, uint64(len(m.Name)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func encodeVarintSpecification(dAtA []byte, offset int, v uint64) int {
	offset -= sovSpecification(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *ScopeSpecification) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.SpecificationId.Size()
	n += 1 + l + sovSpecification(uint64(l))
	if m.Description != nil {
		l = m.Description.Size()
		n += 1 + l + sovSpecification(uint64(l))
	}
	if len(m.OwnerAddresses) > 0 {
		for _, s := range m.OwnerAddresses {
			l = len(s)
			n += 1 + l + sovSpecification(uint64(l))
		}
	}
	if len(m.PartiesInvolved) > 0 {
		l = 0
		for _, e := range m.PartiesInvolved {
			l += sovSpecification(uint64(e))
		}
		n += 1 + sovSpecification(uint64(l)) + l
	}
	if len(m.ContractSpecIds) > 0 {
		for _, e := range m.ContractSpecIds {
			l = e.Size()
			n += 1 + l + sovSpecification(uint64(l))
		}
	}
	return n
}

func (m *ContractSpecification) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.SpecificationId.Size()
	n += 1 + l + sovSpecification(uint64(l))
	if m.Description != nil {
		l = m.Description.Size()
		n += 1 + l + sovSpecification(uint64(l))
	}
	if len(m.OwnerAddresses) > 0 {
		for _, s := range m.OwnerAddresses {
			l = len(s)
			n += 1 + l + sovSpecification(uint64(l))
		}
	}
	if len(m.PartiesInvolved) > 0 {
		l = 0
		for _, e := range m.PartiesInvolved {
			l += sovSpecification(uint64(e))
		}
		n += 1 + sovSpecification(uint64(l)) + l
	}
	if m.Source != nil {
		n += m.Source.Size()
	}
	l = len(m.ClassName)
	if l > 0 {
		n += 1 + l + sovSpecification(uint64(l))
	}
	return n
}

func (m *ContractSpecification_ResourceId) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.ResourceId != nil {
		l = len(m.ResourceId)
		n += 1 + l + sovSpecification(uint64(l))
	}
	return n
}
func (m *ContractSpecification_Hash) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Hash)
	n += 1 + l + sovSpecification(uint64(l))
	return n
}
func (m *RecordSpecification) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.SpecificationId.Size()
	n += 1 + l + sovSpecification(uint64(l))
	l = len(m.Name)
	if l > 0 {
		n += 1 + l + sovSpecification(uint64(l))
	}
	if len(m.Inputs) > 0 {
		for _, e := range m.Inputs {
			l = e.Size()
			n += 1 + l + sovSpecification(uint64(l))
		}
	}
	l = len(m.TypeName)
	if l > 0 {
		n += 1 + l + sovSpecification(uint64(l))
	}
	if m.ResultType != 0 {
		n += 1 + sovSpecification(uint64(m.ResultType))
	}
	if len(m.ResponsibleParties) > 0 {
		l = 0
		for _, e := range m.ResponsibleParties {
			l += sovSpecification(uint64(e))
		}
		n += 1 + sovSpecification(uint64(l)) + l
	}
	return n
}

func (m *InputSpecification) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Name)
	if l > 0 {
		n += 1 + l + sovSpecification(uint64(l))
	}
	l = len(m.TypeName)
	if l > 0 {
		n += 1 + l + sovSpecification(uint64(l))
	}
	if m.Source != nil {
		n += m.Source.Size()
	}
	return n
}

func (m *InputSpecification_RecordId) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.RecordId.Size()
	n += 1 + l + sovSpecification(uint64(l))
	return n
}
func (m *InputSpecification_Hash) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Hash)
	n += 1 + l + sovSpecification(uint64(l))
	return n
}
func (m *Description) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Name)
	if l > 0 {
		n += 1 + l + sovSpecification(uint64(l))
	}
	l = len(m.Description)
	if l > 0 {
		n += 1 + l + sovSpecification(uint64(l))
	}
	l = len(m.WebsiteUrl)
	if l > 0 {
		n += 1 + l + sovSpecification(uint64(l))
	}
	l = len(m.IconUrl)
	if l > 0 {
		n += 1 + l + sovSpecification(uint64(l))
	}
	return n
}

func sovSpecification(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozSpecification(x uint64) (n int) {
	return sovSpecification(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *ScopeSpecification) String() string {
	if this == nil {
		return "nil"
	}
	s := strings.Join([]string{`&ScopeSpecification{`,
		`SpecificationId:` + fmt.Sprintf("%v", this.SpecificationId) + `,`,
		`Description:` + strings.Replace(fmt.Sprintf("%v", this.Description), "Description", "Description", 1) + `,`,
		`OwnerAddresses:` + fmt.Sprintf("%v", this.OwnerAddresses) + `,`,
		`PartiesInvolved:` + fmt.Sprintf("%v", this.PartiesInvolved) + `,`,
		`ContractSpecIds:` + fmt.Sprintf("%v", this.ContractSpecIds) + `,`,
		`}`,
	}, "")
	return s
}
func (this *ContractSpecification) String() string {
	if this == nil {
		return "nil"
	}
	s := strings.Join([]string{`&ContractSpecification{`,
		`SpecificationId:` + fmt.Sprintf("%v", this.SpecificationId) + `,`,
		`Description:` + strings.Replace(fmt.Sprintf("%v", this.Description), "Description", "Description", 1) + `,`,
		`OwnerAddresses:` + fmt.Sprintf("%v", this.OwnerAddresses) + `,`,
		`PartiesInvolved:` + fmt.Sprintf("%v", this.PartiesInvolved) + `,`,
		`Source:` + fmt.Sprintf("%v", this.Source) + `,`,
		`ClassName:` + fmt.Sprintf("%v", this.ClassName) + `,`,
		`}`,
	}, "")
	return s
}
func (this *ContractSpecification_ResourceId) String() string {
	if this == nil {
		return "nil"
	}
	s := strings.Join([]string{`&ContractSpecification_ResourceId{`,
		`ResourceId:` + fmt.Sprintf("%v", this.ResourceId) + `,`,
		`}`,
	}, "")
	return s
}
func (this *ContractSpecification_Hash) String() string {
	if this == nil {
		return "nil"
	}
	s := strings.Join([]string{`&ContractSpecification_Hash{`,
		`Hash:` + fmt.Sprintf("%v", this.Hash) + `,`,
		`}`,
	}, "")
	return s
}
func (this *RecordSpecification) String() string {
	if this == nil {
		return "nil"
	}
	repeatedStringForInputs := "[]*InputSpecification{"
	for _, f := range this.Inputs {
		repeatedStringForInputs += strings.Replace(f.String(), "InputSpecification", "InputSpecification", 1) + ","
	}
	repeatedStringForInputs += "}"
	s := strings.Join([]string{`&RecordSpecification{`,
		`SpecificationId:` + fmt.Sprintf("%v", this.SpecificationId) + `,`,
		`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
		`Inputs:` + repeatedStringForInputs + `,`,
		`TypeName:` + fmt.Sprintf("%v", this.TypeName) + `,`,
		`ResultType:` + fmt.Sprintf("%v", this.ResultType) + `,`,
		`ResponsibleParties:` + fmt.Sprintf("%v", this.ResponsibleParties) + `,`,
		`}`,
	}, "")
	return s
}
func (this *InputSpecification) String() string {
	if this == nil {
		return "nil"
	}
	s := strings.Join([]string{`&InputSpecification{`,
		`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
		`TypeName:` + fmt.Sprintf("%v", this.TypeName) + `,`,
		`Source:` + fmt.Sprintf("%v", this.Source) + `,`,
		`}`,
	}, "")
	return s
}
func (this *InputSpecification_RecordId) String() string {
	if this == nil {
		return "nil"
	}
	s := strings.Join([]string{`&InputSpecification_RecordId{`,
		`RecordId:` + fmt.Sprintf("%v", this.RecordId) + `,`,
		`}`,
	}, "")
	return s
}
func (this *InputSpecification_Hash) String() string {
	if this == nil {
		return "nil"
	}
	s := strings.Join([]string{`&InputSpecification_Hash{`,
		`Hash:` + fmt.Sprintf("%v", this.Hash) + `,`,
		`}`,
	}, "")
	return s
}
func valueToStringSpecification(v interface{}) string {
	rv := reflect.ValueOf(v)
	if rv.IsNil() {
		return "nil"
	}
	pv := reflect.Indirect(rv).Interface()
	return fmt.Sprintf("*%v", pv)
}
func (m *ScopeSpecification) 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 ErrIntOverflowSpecification
			}
			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: ScopeSpecification: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: ScopeSpecification: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SpecificationId", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.SpecificationId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Description == nil {
				m.Description = &Description{}
			}
			if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddresses", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				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 ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.OwnerAddresses = append(m.OwnerAddresses, string(dAtA[iNdEx:postIndex]))
			iNdEx = postIndex
		case 4:
			if wireType == 0 {
				var v PartyType
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return ErrIntOverflowSpecification
					}
					if iNdEx >= l {
						return io.ErrUnexpectedEOF
					}
					b := dAtA[iNdEx]
					iNdEx++
					v |= PartyType(b&0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				m.PartiesInvolved = append(m.PartiesInvolved, v)
			} else if wireType == 2 {
				var packedLen int
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return ErrIntOverflowSpecification
					}
					if iNdEx >= l {
						return io.ErrUnexpectedEOF
					}
					b := dAtA[iNdEx]
					iNdEx++
					packedLen |= int(b&0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				if packedLen < 0 {
					return ErrInvalidLengthSpecification
				}
				postIndex := iNdEx + packedLen
				if postIndex < 0 {
					return ErrInvalidLengthSpecification
				}
				if postIndex > l {
					return io.ErrUnexpectedEOF
				}
				var elementCount int
				if elementCount != 0 && len(m.PartiesInvolved) == 0 {
					m.PartiesInvolved = make([]PartyType, 0, elementCount)
				}
				for iNdEx < postIndex {
					var v PartyType
					for shift := uint(0); ; shift += 7 {
						if shift >= 64 {
							return ErrIntOverflowSpecification
						}
						if iNdEx >= l {
							return io.ErrUnexpectedEOF
						}
						b := dAtA[iNdEx]
						iNdEx++
						v |= PartyType(b&0x7F) << shift
						if b < 0x80 {
							break
						}
					}
					m.PartiesInvolved = append(m.PartiesInvolved, v)
				}
			} else {
				return fmt.Errorf("proto: wrong wireType = %d for field PartiesInvolved", wireType)
			}
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ContractSpecIds", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			var v MetadataAddress
			m.ContractSpecIds = append(m.ContractSpecIds, v)
			if err := m.ContractSpecIds[len(m.ContractSpecIds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipSpecification(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthSpecification
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *ContractSpecification) 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 ErrIntOverflowSpecification
			}
			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: ContractSpecification: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: ContractSpecification: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SpecificationId", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.SpecificationId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Description == nil {
				m.Description = &Description{}
			}
			if err := m.Description.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddresses", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				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 ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.OwnerAddresses = append(m.OwnerAddresses, string(dAtA[iNdEx:postIndex]))
			iNdEx = postIndex
		case 4:
			if wireType == 0 {
				var v PartyType
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return ErrIntOverflowSpecification
					}
					if iNdEx >= l {
						return io.ErrUnexpectedEOF
					}
					b := dAtA[iNdEx]
					iNdEx++
					v |= PartyType(b&0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				m.PartiesInvolved = append(m.PartiesInvolved, v)
			} else if wireType == 2 {
				var packedLen int
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return ErrIntOverflowSpecification
					}
					if iNdEx >= l {
						return io.ErrUnexpectedEOF
					}
					b := dAtA[iNdEx]
					iNdEx++
					packedLen |= int(b&0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				if packedLen < 0 {
					return ErrInvalidLengthSpecification
				}
				postIndex := iNdEx + packedLen
				if postIndex < 0 {
					return ErrInvalidLengthSpecification
				}
				if postIndex > l {
					return io.ErrUnexpectedEOF
				}
				var elementCount int
				if elementCount != 0 && len(m.PartiesInvolved) == 0 {
					m.PartiesInvolved = make([]PartyType, 0, elementCount)
				}
				for iNdEx < postIndex {
					var v PartyType
					for shift := uint(0); ; shift += 7 {
						if shift >= 64 {
							return ErrIntOverflowSpecification
						}
						if iNdEx >= l {
							return io.ErrUnexpectedEOF
						}
						b := dAtA[iNdEx]
						iNdEx++
						v |= PartyType(b&0x7F) << shift
						if b < 0x80 {
							break
						}
					}
					m.PartiesInvolved = append(m.PartiesInvolved, v)
				}
			} else {
				return fmt.Errorf("proto: wrong wireType = %d for field PartiesInvolved", wireType)
			}
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ResourceId", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			v := make([]byte, postIndex-iNdEx)
			copy(v, dAtA[iNdEx:postIndex])
			m.Source = &ContractSpecification_ResourceId{v}
			iNdEx = postIndex
		case 6:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				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 ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Source = &ContractSpecification_Hash{string(dAtA[iNdEx:postIndex])}
			iNdEx = postIndex
		case 7:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ClassName", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				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 ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ClassName = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipSpecification(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthSpecification
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *RecordSpecification) 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 ErrIntOverflowSpecification
			}
			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: RecordSpecification: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: RecordSpecification: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SpecificationId", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.SpecificationId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				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 ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Name = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Inputs", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Inputs = append(m.Inputs, &InputSpecification{})
			if err := m.Inputs[len(m.Inputs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field TypeName", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				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 ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.TypeName = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 5:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field ResultType", wireType)
			}
			m.ResultType = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.ResultType |= DefinitionType(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 6:
			if wireType == 0 {
				var v PartyType
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return ErrIntOverflowSpecification
					}
					if iNdEx >= l {
						return io.ErrUnexpectedEOF
					}
					b := dAtA[iNdEx]
					iNdEx++
					v |= PartyType(b&0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				m.ResponsibleParties = append(m.ResponsibleParties, v)
			} else if wireType == 2 {
				var packedLen int
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return ErrIntOverflowSpecification
					}
					if iNdEx >= l {
						return io.ErrUnexpectedEOF
					}
					b := dAtA[iNdEx]
					iNdEx++
					packedLen |= int(b&0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				if packedLen < 0 {
					return ErrInvalidLengthSpecification
				}
				postIndex := iNdEx + packedLen
				if postIndex < 0 {
					return ErrInvalidLengthSpecification
				}
				if postIndex > l {
					return io.ErrUnexpectedEOF
				}
				var elementCount int
				if elementCount != 0 && len(m.ResponsibleParties) == 0 {
					m.ResponsibleParties = make([]PartyType, 0, elementCount)
				}
				for iNdEx < postIndex {
					var v PartyType
					for shift := uint(0); ; shift += 7 {
						if shift >= 64 {
							return ErrIntOverflowSpecification
						}
						if iNdEx >= l {
							return io.ErrUnexpectedEOF
						}
						b := dAtA[iNdEx]
						iNdEx++
						v |= PartyType(b&0x7F) << shift
						if b < 0x80 {
							break
						}
					}
					m.ResponsibleParties = append(m.ResponsibleParties, v)
				}
			} else {
				return fmt.Errorf("proto: wrong wireType = %d for field ResponsibleParties", wireType)
			}
		default:
			iNdEx = preIndex
			skippy, err := skipSpecification(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthSpecification
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *InputSpecification) 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 ErrIntOverflowSpecification
			}
			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: InputSpecification: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: InputSpecification: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				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 ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Name = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field TypeName", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				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 ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.TypeName = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RecordId", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			var vv MetadataAddress
			v := &vv
			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			m.Source = &InputSpecification_RecordId{*v}
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				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 ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Source = &InputSpecification_Hash{string(dAtA[iNdEx:postIndex])}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipSpecification(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthSpecification
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *Description) 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 ErrIntOverflowSpecification
			}
			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: Description: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Description: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				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 ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Name = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				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 ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Description = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field WebsiteUrl", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				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 ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.WebsiteUrl = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field IconUrl", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSpecification
				}
				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 ErrInvalidLengthSpecification
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSpecification
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.IconUrl = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipSpecification(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthSpecification
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

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

var (
	ErrInvalidLengthSpecification        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSpecification          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupSpecification = fmt.Errorf("proto: unexpected end of group")
)
