// 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"
import _ "code.justin.tv/eventbus/schema/pkg/eventbus/owner"

// 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_62166cdcbe2c20ef, []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_62166cdcbe2c20ef, []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_62166cdcbe2c20ef, []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_62166cdcbe2c20ef) }

var fileDescriptor_create_62166cdcbe2c20ef = []byte{
	// 332 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0xc1, 0x4b, 0xc3, 0x30,
	0x14, 0xc6, 0x6d, 0xed, 0xa6, 0xbe, 0xb2, 0x8a, 0x71, 0x48, 0x18, 0x43, 0xe6, 0x40, 0xd8, 0xc5,
	0x0e, 0xe6, 0x4d, 0x50, 0x70, 0xbb, 0xb8, 0x83, 0x08, 0x53, 0x2f, 0x5e, 0x4a, 0xda, 0x3e, 0xb7,
	0x80, 0x4d, 0x46, 0x92, 0x2a, 0xf3, 0xbf, 0xd0, 0xa3, 0xff, 0xc7, 0xfe, 0x3f, 0x49, 0xba, 0x4d,
	0x77, 0x0b, 0xdf, 0xef, 0x7b, 0x1f, 0x5f, 0xde, 0x03, 0x92, 0xcd, 0x10, 0x55, 0x3f, 0x53, 0xc8,
	0x0c, 0xc6, 0x73, 0x25, 0x8d, 0x24, 0x35, 0xa7, 0xb5, 0xda, 0xf8, 0x8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