// Code generated by protoc-gen-go. DO NOT EDIT.
// source: cheer/create.proto

package cheer

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import authorization "code.justin.tv/eventbus/schema/pkg/eventbus/authorization"

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

// CheerCreate triggers when a user successfully cheers bits at a broadcaster.
type CheerCreate struct {
	// The unique bits transaction associated with this cheer
	BitsTransactionId string `protobuf:"bytes,1,opt,name=bits_transaction_id,json=bitsTransactionId,proto3" json:"bits_transaction_id,omitempty"`
	// The recipient of the bits, as a unique user identifier (not display name)
	ToUserId string `protobuf:"bytes,2,opt,name=to_user_id,json=toUserId,proto3" json:"to_user_id,omitempty"`
	// The details of the user sending the bits can come in 1 of 2 forms:
	// - An identified user, in which case some additional information is provided
	// - An anonymous user, in which case no additional information is available
	//
	// Types that are valid to be assigned to From:
	//	*CheerCreate_User
	//	*CheerCreate_AnonymousUser
	From isCheerCreate_From `protobuf_oneof:"from"`
	// The chat message that accompanied this cheer
	PublicMessage string `protobuf:"bytes,5,opt,name=public_message,json=publicMessage,proto3" json:"public_message,omitempty"`
	// The number of bits cheered to the broadcaster
	Bits                 int64    `protobuf:"zigzag64,6,opt,name=bits,proto3" json:"bits,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

var xxx_messageInfo_CheerCreate proto.InternalMessageInfo

func (m *CheerCreate) GetBitsTransactionId() string {
	if m != nil {
		return m.BitsTransactionId
	}
	return ""
}

func (m *CheerCreate) GetToUserId() string {
	if m != nil {
		return m.ToUserId
	}
	return ""
}

type isCheerCreate_From interface {
	isCheerCreate_From()
}

type CheerCreate_User struct {
	User *User `protobuf:"bytes,3,opt,name=user,proto3,oneof"`
}

type CheerCreate_AnonymousUser struct {
	AnonymousUser *AnonymousUser `protobuf:"bytes,4,opt,name=anonymous_user,json=anonymousUser,proto3,oneof"`
}

func (*CheerCreate_User) isCheerCreate_From() {}

func (*CheerCreate_AnonymousUser) isCheerCreate_From() {}

func (m *CheerCreate) GetFrom() isCheerCreate_From {
	if m != nil {
		return m.From
	}
	return nil
}

func (m *CheerCreate) GetUser() *User {
	if x, ok := m.GetFrom().(*CheerCreate_User); ok {
		return x.User
	}
	return nil
}

func (m *CheerCreate) GetAnonymousUser() *AnonymousUser {
	if x, ok := m.GetFrom().(*CheerCreate_AnonymousUser); ok {
		return x.AnonymousUser
	}
	return nil
}

func (m *CheerCreate) GetPublicMessage() string {
	if m != nil {
		return m.PublicMessage
	}
	return ""
}

func (m *CheerCreate) GetBits() int64 {
	if m != nil {
		return m.Bits
	}
	return 0
}

// XXX_OneofFuncs is for the internal use of the proto package.
func (*CheerCreate) 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 _CheerCreate_OneofMarshaler, _CheerCreate_OneofUnmarshaler, _CheerCreate_OneofSizer, []interface{}{
		(*CheerCreate_User)(nil),
		(*CheerCreate_AnonymousUser)(nil),
	}
}

func _CheerCreate_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
	m := msg.(*CheerCreate)
	// from
	switch x := m.From.(type) {
	case *CheerCreate_User:
		b.EncodeVarint(3<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.User); err != nil {
			return err
		}
	case *CheerCreate_AnonymousUser:
		b.EncodeVarint(4<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.AnonymousUser); err != nil {
			return err
		}
	case nil:
	default:
		return fmt.Errorf("CheerCreate.From has unexpected type %T", x)
	}
	return nil
}

func _CheerCreate_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
	m := msg.(*CheerCreate)
	switch tag {
	case 3: // from.user
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(User)
		err := b.DecodeMessage(msg)
		m.From = &CheerCreate_User{msg}
		return true, err
	case 4: // from.anonymous_user
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(AnonymousUser)
		err := b.DecodeMessage(msg)
		m.From = &CheerCreate_AnonymousUser{msg}
		return true, err
	default:
		return false, nil
	}
}

func _CheerCreate_OneofSizer(msg proto.Message) (n int) {
	m := msg.(*CheerCreate)
	// from
	switch x := m.From.(type) {
	case *CheerCreate_User:
		s := proto.Size(x.User)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *CheerCreate_AnonymousUser:
		s := proto.Size(x.AnonymousUser)
		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
}

// User information, when cheer is not made anonymously.
// Contains additional public information to contextualize the cheer transaction.
type User struct {
	// The spender of the bits, as a unique user identifier (not display name)
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

var xxx_messageInfo_User proto.InternalMessageInfo

func (m *User) GetId() string {
	if m != nil {
		return m.Id
	}
	return ""
}

// AnonymousUser contains a restricted field for the anonymous cheerer.
type AnonymousUser struct {
	// The spender of the bits, as a unique user identifier (not display name)
	Id                   *authorization.String `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

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

var xxx_messageInfo_AnonymousUser proto.InternalMessageInfo

func (m *AnonymousUser) GetId() *authorization.String {
	if m != nil {
		return m.Id
	}
	return nil
}

func init() {
	proto.RegisterType((*CheerCreate)(nil), "cheer.CheerCreate")
	proto.RegisterType((*User)(nil), "cheer.User")
	proto.RegisterType((*AnonymousUser)(nil), "cheer.AnonymousUser")
}

func init() { proto.RegisterFile("cheer/create.proto", fileDescriptor_create_e3ee9322d2f5486e) }

var fileDescriptor_create_e3ee9322d2f5486e = []byte{
	// 308 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0xc1, 0x4a, 0x33, 0x31,
	0x10, 0xc7, 0xbf, 0xdd, 0x6f, 0x5b, 0x75, 0x96, 0x2e, 0x18, 0x45, 0x82, 0x14, 0xa9, 0x05, 0xa1,
	0xa7, 0x14, 0xea, 0x59, 0xc1, 0xf6, 0x62, 0x0f, 0x22, 0x54, 0xbd, 0x78, 0x59, 0xb2, 0xbb, 0x63,
	0x1b, 0xb0, 0x49, 0x49, 0x66, 0x05, 0x3d, 0xf9, 0x0c, 0xbe, 0x8b, 0xef, 0x27, 0xc9, 0xb6, 0xd5,
	0xde, 0xc2, 0xff, 0xf7, 0x9b, 0xc9, 0x64, 0x02, 0xac, 0x5c, 0x20, 0xda, 0x61, 0x69, 0x51, 0x12,
	0x8a, 0x95, 0x35, 0x64, 0x58, 0x2b, 0x64, 0xa7, 0x5d, 0x7c, 0x43, 0x4d, 0x45, 0xed, 0x86, 0xb2,
	0xa6, 0x85, 0xb1, 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