// Code generated by protoc-gen-gogo.
// source: api/cast_channel.proto
// DO NOT EDIT!

/*
Package api is a generated protocol buffer package.

It is generated from these files:
	api/cast_channel.proto

It has these top-level messages:
	CastMessage
	AuthChallenge
	AuthResponse
	AuthError
	DeviceAuthMessage
*/
package api

import proto "github.com/gogo/protobuf/proto"
import json "encoding/json"
import math "math"

// Reference proto, json, and math imports to suppress error if they are not otherwise used.
var _ = proto.Marshal
var _ = &json.SyntaxError{}
var _ = math.Inf

// Always pass a version of the protocol for future compatibility
// requirements.
type CastMessage_ProtocolVersion int32

const (
	CastMessage_CASTV2_1_0 CastMessage_ProtocolVersion = 0
)

var CastMessage_ProtocolVersion_name = map[int32]string{
	0: "CASTV2_1_0",
}
var CastMessage_ProtocolVersion_value = map[string]int32{
	"CASTV2_1_0": 0,
}

func (x CastMessage_ProtocolVersion) Enum() *CastMessage_ProtocolVersion {
	p := new(CastMessage_ProtocolVersion)
	*p = x
	return p
}
func (x CastMessage_ProtocolVersion) String() string {
	return proto.EnumName(CastMessage_ProtocolVersion_name, int32(x))
}
func (x *CastMessage_ProtocolVersion) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(CastMessage_ProtocolVersion_value, data, "CastMessage_ProtocolVersion")
	if err != nil {
		return err
	}
	*x = CastMessage_ProtocolVersion(value)
	return nil
}

// What type of data do we have in this message.
type CastMessage_PayloadType int32

const (
	CastMessage_STRING CastMessage_PayloadType = 0
	CastMessage_BINARY CastMessage_PayloadType = 1
)

var CastMessage_PayloadType_name = map[int32]string{
	0: "STRING",
	1: "BINARY",
}
var CastMessage_PayloadType_value = map[string]int32{
	"STRING": 0,
	"BINARY": 1,
}

func (x CastMessage_PayloadType) Enum() *CastMessage_PayloadType {
	p := new(CastMessage_PayloadType)
	*p = x
	return p
}
func (x CastMessage_PayloadType) String() string {
	return proto.EnumName(CastMessage_PayloadType_name, int32(x))
}
func (x *CastMessage_PayloadType) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(CastMessage_PayloadType_value, data, "CastMessage_PayloadType")
	if err != nil {
		return err
	}
	*x = CastMessage_PayloadType(value)
	return nil
}

type AuthError_ErrorType int32

const (
	AuthError_INTERNAL_ERROR AuthError_ErrorType = 0
	AuthError_NO_TLS         AuthError_ErrorType = 1
)

var AuthError_ErrorType_name = map[int32]string{
	0: "INTERNAL_ERROR",
	1: "NO_TLS",
}
var AuthError_ErrorType_value = map[string]int32{
	"INTERNAL_ERROR": 0,
	"NO_TLS":         1,
}

func (x AuthError_ErrorType) Enum() *AuthError_ErrorType {
	p := new(AuthError_ErrorType)
	*p = x
	return p
}
func (x AuthError_ErrorType) String() string {
	return proto.EnumName(AuthError_ErrorType_name, int32(x))
}
func (x *AuthError_ErrorType) UnmarshalJSON(data []byte) error {
	value, err := proto.UnmarshalJSONEnum(AuthError_ErrorType_value, data, "AuthError_ErrorType")
	if err != nil {
		return err
	}
	*x = AuthError_ErrorType(value)
	return nil
}

type CastMessage struct {
	ProtocolVersion *CastMessage_ProtocolVersion `protobuf:"varint,1,req,name=protocol_version,enum=api.CastMessage_ProtocolVersion" json:"protocol_version,omitempty"`
	// source and destination ids identify the origin and destination of the
	// message.  They are used to route messages between endpoints that share a
	// device-to-device channel.
	//
	// For messages between applications:
	//   - The sender application id is a unique identifier generated on behalf of
	//     the sender application.
	//   - The receiver id is always the the session id for the application.
	//
	// For messages to or from the sender or receiver platform, the special ids
	// 'sender-0' and 'receiver-0' can be used.
	//
	// For messages intended for all endpoints using a given channel, the
	// wildcard destination_id '*' can be used.
	SourceId      *string `protobuf:"bytes,2,req,name=source_id" json:"source_id,omitempty"`
	DestinationId *string `protobuf:"bytes,3,req,name=destination_id" json:"destination_id,omitempty"`
	// This is the core multiplexing key.  All messages are sent on a namespace
	// and endpoints sharing a channel listen on one or more namespaces.  The
	// namespace defines the protocol and semantics of the message.
	Namespace   *string                  `protobuf:"bytes,4,req,name=namespace" json:"namespace,omitempty"`
	PayloadType *CastMessage_PayloadType `protobuf:"varint,5,req,name=payload_type,enum=api.CastMessage_PayloadType" json:"payload_type,omitempty"`
	// Depending on payload_type, exactly one of the following optional fields
	// will always be set.
	PayloadUtf8      *string `protobuf:"bytes,6,opt,name=payload_utf8" json:"payload_utf8,omitempty"`
	PayloadBinary    []byte  `protobuf:"bytes,7,opt,name=payload_binary" json:"payload_binary,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (m *CastMessage) Reset()         { *m = CastMessage{} }
func (m *CastMessage) String() string { return proto.CompactTextString(m) }
func (*CastMessage) ProtoMessage()    {}

func (m *CastMessage) GetProtocolVersion() CastMessage_ProtocolVersion {
	if m != nil && m.ProtocolVersion != nil {
		return *m.ProtocolVersion
	}
	return CastMessage_CASTV2_1_0
}

func (m *CastMessage) GetSourceId() string {
	if m != nil && m.SourceId != nil {
		return *m.SourceId
	}
	return ""
}

func (m *CastMessage) GetDestinationId() string {
	if m != nil && m.DestinationId != nil {
		return *m.DestinationId
	}
	return ""
}

func (m *CastMessage) GetNamespace() string {
	if m != nil && m.Namespace != nil {
		return *m.Namespace
	}
	return ""
}

func (m *CastMessage) GetPayloadType() CastMessage_PayloadType {
	if m != nil && m.PayloadType != nil {
		return *m.PayloadType
	}
	return CastMessage_STRING
}

func (m *CastMessage) GetPayloadUtf8() string {
	if m != nil && m.PayloadUtf8 != nil {
		return *m.PayloadUtf8
	}
	return ""
}

func (m *CastMessage) GetPayloadBinary() []byte {
	if m != nil {
		return m.PayloadBinary
	}
	return nil
}

// Messages for authentication protocol between a sender and a receiver.
type AuthChallenge struct {
	XXX_unrecognized []byte `json:"-"`
}

func (m *AuthChallenge) Reset()         { *m = AuthChallenge{} }
func (m *AuthChallenge) String() string { return proto.CompactTextString(m) }
func (*AuthChallenge) ProtoMessage()    {}

type AuthResponse struct {
	Signature             []byte `protobuf:"bytes,1,req,name=signature" json:"signature,omitempty"`
	ClientAuthCertificate []byte `protobuf:"bytes,2,req,name=client_auth_certificate" json:"client_auth_certificate,omitempty"`
	XXX_unrecognized      []byte `json:"-"`
}

func (m *AuthResponse) Reset()         { *m = AuthResponse{} }
func (m *AuthResponse) String() string { return proto.CompactTextString(m) }
func (*AuthResponse) ProtoMessage()    {}

func (m *AuthResponse) GetSignature() []byte {
	if m != nil {
		return m.Signature
	}
	return nil
}

func (m *AuthResponse) GetClientAuthCertificate() []byte {
	if m != nil {
		return m.ClientAuthCertificate
	}
	return nil
}

type AuthError struct {
	ErrorType        *AuthError_ErrorType `protobuf:"varint,1,req,name=error_type,enum=api.AuthError_ErrorType" json:"error_type,omitempty"`
	XXX_unrecognized []byte               `json:"-"`
}

func (m *AuthError) Reset()         { *m = AuthError{} }
func (m *AuthError) String() string { return proto.CompactTextString(m) }
func (*AuthError) ProtoMessage()    {}

func (m *AuthError) GetErrorType() AuthError_ErrorType {
	if m != nil && m.ErrorType != nil {
		return *m.ErrorType
	}
	return AuthError_INTERNAL_ERROR
}

type DeviceAuthMessage struct {
	// Request fields
	Challenge *AuthChallenge `protobuf:"bytes,1,opt,name=challenge" json:"challenge,omitempty"`
	// Response fields
	Response         *AuthResponse `protobuf:"bytes,2,opt,name=response" json:"response,omitempty"`
	Error            *AuthError    `protobuf:"bytes,3,opt,name=error" json:"error,omitempty"`
	XXX_unrecognized []byte        `json:"-"`
}

func (m *DeviceAuthMessage) Reset()         { *m = DeviceAuthMessage{} }
func (m *DeviceAuthMessage) String() string { return proto.CompactTextString(m) }
func (*DeviceAuthMessage) ProtoMessage()    {}

func (m *DeviceAuthMessage) GetChallenge() *AuthChallenge {
	if m != nil {
		return m.Challenge
	}
	return nil
}

func (m *DeviceAuthMessage) GetResponse() *AuthResponse {
	if m != nil {
		return m.Response
	}
	return nil
}

func (m *DeviceAuthMessage) GetError() *AuthError {
	if m != nil {
		return m.Error
	}
	return nil
}

func init() {
	proto.RegisterEnum("api.CastMessage_ProtocolVersion", CastMessage_ProtocolVersion_name, CastMessage_ProtocolVersion_value)
	proto.RegisterEnum("api.CastMessage_PayloadType", CastMessage_PayloadType_name, CastMessage_PayloadType_value)
	proto.RegisterEnum("api.AuthError_ErrorType", AuthError_ErrorType_name, AuthError_ErrorType_value)
}
