/*
Notice: This file has been modified for Hyperledger Fabric SDK Go usage.
Please review third_party pinning scripts and patches for more details.
*/
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: token/operations.proto

package token // import "github.com/fabric-sdk-sample/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/token"

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"

// 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.ProtoPackageIsVersion2 // please upgrade the proto package

// TokenOperation describes a token operation
type TokenOperation struct {
	// Types that are valid to be assigned to Operation:
	//	*TokenOperation_Action
	Operation            isTokenOperation_Operation `protobuf_oneof:"Operation"`
	XXX_NoUnkeyedLiteral struct{}                   `json:"-"`
	XXX_unrecognized     []byte                     `json:"-"`
	XXX_sizecache        int32                      `json:"-"`
}

func (m *TokenOperation) Reset()         { *m = TokenOperation{} }
func (m *TokenOperation) String() string { return proto.CompactTextString(m) }
func (*TokenOperation) ProtoMessage()    {}
func (*TokenOperation) Descriptor() ([]byte, []int) {
	return fileDescriptor_operations_019bb882640dd787, []int{0}
}
func (m *TokenOperation) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_TokenOperation.Unmarshal(m, b)
}
func (m *TokenOperation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_TokenOperation.Marshal(b, m, deterministic)
}
func (dst *TokenOperation) XXX_Merge(src proto.Message) {
	xxx_messageInfo_TokenOperation.Merge(dst, src)
}
func (m *TokenOperation) XXX_Size() int {
	return xxx_messageInfo_TokenOperation.Size(m)
}
func (m *TokenOperation) XXX_DiscardUnknown() {
	xxx_messageInfo_TokenOperation.DiscardUnknown(m)
}

var xxx_messageInfo_TokenOperation proto.InternalMessageInfo

type isTokenOperation_Operation interface {
	isTokenOperation_Operation()
}

type TokenOperation_Action struct {
	Action *TokenOperationAction `protobuf:"bytes,1,opt,name=Action,proto3,oneof"`
}

func (*TokenOperation_Action) isTokenOperation_Operation() {}

func (m *TokenOperation) GetOperation() isTokenOperation_Operation {
	if m != nil {
		return m.Operation
	}
	return nil
}

func (m *TokenOperation) GetAction() *TokenOperationAction {
	if x, ok := m.GetOperation().(*TokenOperation_Action); ok {
		return x.Action
	}
	return nil
}

// XXX_OneofFuncs is for the internal use of the proto package.
func (*TokenOperation) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
	return _TokenOperation_OneofMarshaler, _TokenOperation_OneofUnmarshaler, _TokenOperation_OneofSizer, []interface{}{
		(*TokenOperation_Action)(nil),
	}
}

func _TokenOperation_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
	m := msg.(*TokenOperation)
	// Operation
	switch x := m.Operation.(type) {
	case *TokenOperation_Action:
		b.EncodeVarint(1<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.Action); err != nil {
			return err
		}
	case nil:
	default:
		return fmt.Errorf("TokenOperation.Operation has unexpected type %T", x)
	}
	return nil
}

func _TokenOperation_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
	m := msg.(*TokenOperation)
	switch tag {
	case 1: // Operation.Action
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(TokenOperationAction)
		err := b.DecodeMessage(msg)
		m.Operation = &TokenOperation_Action{msg}
		return true, err
	default:
		return false, nil
	}
}

func _TokenOperation_OneofSizer(msg proto.Message) (n int) {
	m := msg.(*TokenOperation)
	// Operation
	switch x := m.Operation.(type) {
	case *TokenOperation_Action:
		s := proto.Size(x.Action)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case nil:
	default:
		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
	}
	return n
}

// TokenOperationAction lists the available operations
type TokenOperationAction struct {
	// Types that are valid to be assigned to Payload:
	//	*TokenOperationAction_Issue
	//	*TokenOperationAction_Transfer
	Payload              isTokenOperationAction_Payload `protobuf_oneof:"Payload"`
	XXX_NoUnkeyedLiteral struct{}                       `json:"-"`
	XXX_unrecognized     []byte                         `json:"-"`
	XXX_sizecache        int32                          `json:"-"`
}

func (m *TokenOperationAction) Reset()         { *m = TokenOperationAction{} }
func (m *TokenOperationAction) String() string { return proto.CompactTextString(m) }
func (*TokenOperationAction) ProtoMessage()    {}
func (*TokenOperationAction) Descriptor() ([]byte, []int) {
	return fileDescriptor_operations_019bb882640dd787, []int{1}
}
func (m *TokenOperationAction) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_TokenOperationAction.Unmarshal(m, b)
}
func (m *TokenOperationAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_TokenOperationAction.Marshal(b, m, deterministic)
}
func (dst *TokenOperationAction) XXX_Merge(src proto.Message) {
	xxx_messageInfo_TokenOperationAction.Merge(dst, src)
}
func (m *TokenOperationAction) XXX_Size() int {
	return xxx_messageInfo_TokenOperationAction.Size(m)
}
func (m *TokenOperationAction) XXX_DiscardUnknown() {
	xxx_messageInfo_TokenOperationAction.DiscardUnknown(m)
}

var xxx_messageInfo_TokenOperationAction proto.InternalMessageInfo

type isTokenOperationAction_Payload interface {
	isTokenOperationAction_Payload()
}

type TokenOperationAction_Issue struct {
	Issue *TokenActionTerms `protobuf:"bytes,1,opt,name=Issue,proto3,oneof"`
}

type TokenOperationAction_Transfer struct {
	Transfer *TokenActionTerms `protobuf:"bytes,2,opt,name=Transfer,proto3,oneof"`
}

func (*TokenOperationAction_Issue) isTokenOperationAction_Payload() {}

func (*TokenOperationAction_Transfer) isTokenOperationAction_Payload() {}

func (m *TokenOperationAction) GetPayload() isTokenOperationAction_Payload {
	if m != nil {
		return m.Payload
	}
	return nil
}

func (m *TokenOperationAction) GetIssue() *TokenActionTerms {
	if x, ok := m.GetPayload().(*TokenOperationAction_Issue); ok {
		return x.Issue
	}
	return nil
}

func (m *TokenOperationAction) GetTransfer() *TokenActionTerms {
	if x, ok := m.GetPayload().(*TokenOperationAction_Transfer); ok {
		return x.Transfer
	}
	return nil
}

// XXX_OneofFuncs is for the internal use of the proto package.
func (*TokenOperationAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
	return _TokenOperationAction_OneofMarshaler, _TokenOperationAction_OneofUnmarshaler, _TokenOperationAction_OneofSizer, []interface{}{
		(*TokenOperationAction_Issue)(nil),
		(*TokenOperationAction_Transfer)(nil),
	}
}

func _TokenOperationAction_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
	m := msg.(*TokenOperationAction)
	// Payload
	switch x := m.Payload.(type) {
	case *TokenOperationAction_Issue:
		b.EncodeVarint(1<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.Issue); err != nil {
			return err
		}
	case *TokenOperationAction_Transfer:
		b.EncodeVarint(2<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.Transfer); err != nil {
			return err
		}
	case nil:
	default:
		return fmt.Errorf("TokenOperationAction.Payload has unexpected type %T", x)
	}
	return nil
}

func _TokenOperationAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
	m := msg.(*TokenOperationAction)
	switch tag {
	case 1: // Payload.Issue
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(TokenActionTerms)
		err := b.DecodeMessage(msg)
		m.Payload = &TokenOperationAction_Issue{msg}
		return true, err
	case 2: // Payload.Transfer
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(TokenActionTerms)
		err := b.DecodeMessage(msg)
		m.Payload = &TokenOperationAction_Transfer{msg}
		return true, err
	default:
		return false, nil
	}
}

func _TokenOperationAction_OneofSizer(msg proto.Message) (n int) {
	m := msg.(*TokenOperationAction)
	// Payload
	switch x := m.Payload.(type) {
	case *TokenOperationAction_Issue:
		s := proto.Size(x.Issue)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *TokenOperationAction_Transfer:
		s := proto.Size(x.Transfer)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case nil:
	default:
		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
	}
	return n
}

// TokenActionTerms describes the expected sender and outputs of a token operation
type TokenActionTerms struct {
	// Sender is the party who should perform the operation
	Sender *TokenOwner `protobuf:"bytes,1,opt,name=Sender,proto3" json:"Sender,omitempty"`
	// Outputs contains the expected outputs
	Outputs              []*Token `protobuf:"bytes,2,rep,name=Outputs,proto3" json:"Outputs,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *TokenActionTerms) Reset()         { *m = TokenActionTerms{} }
func (m *TokenActionTerms) String() string { return proto.CompactTextString(m) }
func (*TokenActionTerms) ProtoMessage()    {}
func (*TokenActionTerms) Descriptor() ([]byte, []int) {
	return fileDescriptor_operations_019bb882640dd787, []int{2}
}
func (m *TokenActionTerms) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_TokenActionTerms.Unmarshal(m, b)
}
func (m *TokenActionTerms) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_TokenActionTerms.Marshal(b, m, deterministic)
}
func (dst *TokenActionTerms) XXX_Merge(src proto.Message) {
	xxx_messageInfo_TokenActionTerms.Merge(dst, src)
}
func (m *TokenActionTerms) XXX_Size() int {
	return xxx_messageInfo_TokenActionTerms.Size(m)
}
func (m *TokenActionTerms) XXX_DiscardUnknown() {
	xxx_messageInfo_TokenActionTerms.DiscardUnknown(m)
}

var xxx_messageInfo_TokenActionTerms proto.InternalMessageInfo

func (m *TokenActionTerms) GetSender() *TokenOwner {
	if m != nil {
		return m.Sender
	}
	return nil
}

func (m *TokenActionTerms) GetOutputs() []*Token {
	if m != nil {
		return m.Outputs
	}
	return nil
}

func init() {
	proto.RegisterType((*TokenOperation)(nil), "token.TokenOperation")
	proto.RegisterType((*TokenOperationAction)(nil), "token.TokenOperationAction")
	proto.RegisterType((*TokenActionTerms)(nil), "token.TokenActionTerms")
}

func init() { proto.RegisterFile("token/operations.proto", fileDescriptor_operations_019bb882640dd787) }

var fileDescriptor_operations_019bb882640dd787 = []byte{
	// 276 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0xd0, 0x41, 0x4b, 0xc3, 0x30,
	0x14, 0x07, 0xf0, 0x6d, 0xb2, 0xcd, 0xbd, 0x8a, 0x68, 0x10, 0x57, 0xf4, 0x32, 0x2a, 0xc8, 0xf4,
	0x90, 0xc0, 0x64, 0x1f, 0xc0, 0x9e, 0xe6, 0x69, 0x5a, 0x7b, 0xf2, 0x96, 0xb6, 0x6f, 0x5d, 0x71,
	0x6b, 0xca, 0x4b, 0x8a, 0xec, 0x23, 0xf8, 0xad, 0xa5, 0x4d, 0x37, 0x3a, 0x11, 0x3c, 0x26, 0xff,
	0xdf, 0xff, 0xf1, 0x12, 0xb8, 0x36, 0xea, 0x13, 0x73, 0xa1, 0x0a, 0x24, 0x69, 0x32, 0x95, 0x6b,
	0x5e, 0x90, 0x32, 0x8a, 0xf5, 0xeb, 0xfb, 0x9b, 0xb1, 0x8d, 0x0d, 0xc9, 0x5c, 0xcb, 0xb8, 0x02,
	0x36, 0xf7, 0x42, 0x38, 0x0f, 0xab, 0x68, 0xb9, 0x2f, 0xb2, 0x39, 0x0c, 0x9e, 0x6b, 0xe1, 0x76,
	0x27, 0xdd, 0xa9, 0x33, 0xbb, 0xe5, 0x75, 0x97, 0x1f, 0x33, 0x4b, 0x16, 0x9d, 0xa0, 0xc1, 0xbe,
	0x03, 0xa3, 0x43, 0xe8, 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