// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/maps/routes/v1/fallback_info.proto

package routes

import (
	fmt "fmt"
	math "math"

	proto "github.com/golang/protobuf/proto"
)

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

// Reasons for using fallback response.
type FallbackReason int32

const (
	// No fallback reason specified.
	FallbackReason_FALLBACK_REASON_UNSPECIFIED FallbackReason = 0
	// A server error happened while calculating routes with your preferred
	// routing mode, but we were able to return a result calculated by an
	// alternative mode.
	FallbackReason_SERVER_ERROR FallbackReason = 1
	// We were not able to finish the calculation with your preferred routing mode
	// on time, but we were able to return a result calculated by an alternative
	// mode.
	FallbackReason_LATENCY_EXCEEDED FallbackReason = 2
)

var FallbackReason_name = map[int32]string{
	0: "FALLBACK_REASON_UNSPECIFIED",
	1: "SERVER_ERROR",
	2: "LATENCY_EXCEEDED",
}

var FallbackReason_value = map[string]int32{
	"FALLBACK_REASON_UNSPECIFIED": 0,
	"SERVER_ERROR":                1,
	"LATENCY_EXCEEDED":            2,
}

func (x FallbackReason) String() string {
	return proto.EnumName(FallbackReason_name, int32(x))
}

func (FallbackReason) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_bbc2382c4e7244e3, []int{0}
}

// Actual routing mode used for returned fallback response.
type FallbackRoutingMode int32

const (
	// Not used.
	FallbackRoutingMode_FALLBACK_ROUTING_MODE_UNSPECIFIED FallbackRoutingMode = 0
	// Indicates the "TRAFFIC_UNAWARE" routing mode was used to compute the
	// response.
	FallbackRoutingMode_FALLBACK_TRAFFIC_UNAWARE FallbackRoutingMode = 1
	// Indicates the "TRAFFIC_AWARE" routing mode was used to compute the
	// response.
	FallbackRoutingMode_FALLBACK_TRAFFIC_AWARE FallbackRoutingMode = 2
)

var FallbackRoutingMode_name = map[int32]string{
	0: "FALLBACK_ROUTING_MODE_UNSPECIFIED",
	1: "FALLBACK_TRAFFIC_UNAWARE",
	2: "FALLBACK_TRAFFIC_AWARE",
}

var FallbackRoutingMode_value = map[string]int32{
	"FALLBACK_ROUTING_MODE_UNSPECIFIED": 0,
	"FALLBACK_TRAFFIC_UNAWARE":          1,
	"FALLBACK_TRAFFIC_AWARE":            2,
}

func (x FallbackRoutingMode) String() string {
	return proto.EnumName(FallbackRoutingMode_name, int32(x))
}

func (FallbackRoutingMode) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_bbc2382c4e7244e3, []int{1}
}

// Information related to how and why a fallback result was used. If this field
// is set, then it means the server used a different routing mode from your
// preferred mode as fallback.
type FallbackInfo struct {
	// Routing mode used for the response. If fallback was triggered, the mode
	// may be different from routing preference set in the original client
	// request.
	RoutingMode FallbackRoutingMode `protobuf:"varint,1,opt,name=routing_mode,json=routingMode,proto3,enum=google.maps.routes.v1.FallbackRoutingMode" json:"routing_mode,omitempty"`
	// The reason why fallback response was used instead of the original response.
	// This field is only populated when the fallback mode is triggered and the
	// fallback response is returned.
	Reason               FallbackReason `protobuf:"varint,2,opt,name=reason,proto3,enum=google.maps.routes.v1.FallbackReason" json:"reason,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (m *FallbackInfo) Reset()         { *m = FallbackInfo{} }
func (m *FallbackInfo) String() string { return proto.CompactTextString(m) }
func (*FallbackInfo) ProtoMessage()    {}
func (*FallbackInfo) Descriptor() ([]byte, []int) {
	return fileDescriptor_bbc2382c4e7244e3, []int{0}
}

func (m *FallbackInfo) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_FallbackInfo.Unmarshal(m, b)
}
func (m *FallbackInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_FallbackInfo.Marshal(b, m, deterministic)
}
func (m *FallbackInfo) XXX_Merge(src proto.Message) {
	xxx_messageInfo_FallbackInfo.Merge(m, src)
}
func (m *FallbackInfo) XXX_Size() int {
	return xxx_messageInfo_FallbackInfo.Size(m)
}
func (m *FallbackInfo) XXX_DiscardUnknown() {
	xxx_messageInfo_FallbackInfo.DiscardUnknown(m)
}

var xxx_messageInfo_FallbackInfo proto.InternalMessageInfo

func (m *FallbackInfo) GetRoutingMode() FallbackRoutingMode {
	if m != nil {
		return m.RoutingMode
	}
	return FallbackRoutingMode_FALLBACK_ROUTING_MODE_UNSPECIFIED
}

func (m *FallbackInfo) GetReason() FallbackReason {
	if m != nil {
		return m.Reason
	}
	return FallbackReason_FALLBACK_REASON_UNSPECIFIED
}

func init() {
	proto.RegisterEnum("google.maps.routes.v1.FallbackReason", FallbackReason_name, FallbackReason_value)
	proto.RegisterEnum("google.maps.routes.v1.FallbackRoutingMode", FallbackRoutingMode_name, FallbackRoutingMode_value)
	proto.RegisterType((*FallbackInfo)(nil), "google.maps.routes.v1.FallbackInfo")
}

func init() {
	proto.RegisterFile("google/maps/routes/v1/fallback_info.proto", fileDescriptor_bbc2382c4e7244e3)
}

var fileDescriptor_bbc2382c4e7244e3 = []byte{
	// 377 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcb, 0x4e, 0xc2, 0x40,
	0x18, 0x85, 0x9d, 0xc6, 0xb0, 0x18, 0x09, 0xa9, 0xa3, 0x18, 0xbc, 0x24, 0x5e, 0x12, 0x12, 0x65,
	0xd1, 0xa6, 0xba, 0x24, 0x2e, 0x4a, 0x3b, 0x25, 0x8d, 0xb4, 0x25, 0x53, 0x40, 0x31, 0x24, 0x93,
	0x02, 0xa5, 0x21, 0x96, 0x0e, 0x69, 0x91, 0xa7, 0x71, 0xe5, 0xc6, 0xc4, 0x47, 0xf1, 0x89, 0x5c,
	0x9a, 0x76, 0x40, 0x14, 0x49, 0xdc, 0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