From 0919ae90964351844b947be0a6691bf003826dee Mon Sep 17 00:00:00 2001 From: Johan Stokking Date: Tue, 5 Nov 2019 18:43:17 +0100 Subject: [PATCH] Add v1alpha1 generated protos --- v1alpha1/enums.pb.go | 287 ++ v1alpha1/go.mod | 8 + v1alpha1/go.sum | 52 + v1alpha1/keys.pb.go | 730 ++++ v1alpha1/location.pb.go | 636 ++++ v1alpha1/mapping.pb.go | 2850 +++++++++++++++ v1alpha1/mapping_services.pb.go | 3239 +++++++++++++++++ v1alpha1/messages.pb.go | 5855 +++++++++++++++++++++++++++++++ v1alpha1/packetbroker.pb.go | 37 + v1alpha1/routing.pb.go | 4160 ++++++++++++++++++++++ v1alpha1/routing_services.pb.go | 4117 ++++++++++++++++++++++ 11 files changed, 21971 insertions(+) create mode 100644 v1alpha1/enums.pb.go create mode 100644 v1alpha1/go.mod create mode 100644 v1alpha1/go.sum create mode 100644 v1alpha1/keys.pb.go create mode 100644 v1alpha1/location.pb.go create mode 100644 v1alpha1/mapping.pb.go create mode 100644 v1alpha1/mapping_services.pb.go create mode 100644 v1alpha1/messages.pb.go create mode 100644 v1alpha1/packetbroker.pb.go create mode 100644 v1alpha1/routing.pb.go create mode 100644 v1alpha1/routing_services.pb.go diff --git a/v1alpha1/enums.pb.go b/v1alpha1/enums.pb.go new file mode 100644 index 0000000..fdb1bbe --- /dev/null +++ b/v1alpha1/enums.pb.go @@ -0,0 +1,287 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: packetbroker/api/v1alpha1/enums.proto + +package packetbroker + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// LoRaWAN region as defined in Regional Parameters. +type Region int32 + +const ( + Region_UNKNOWN_REGION Region = 0 + Region_EU_863_870 Region = 1 + Region_US_902_928 Region = 2 + Region_CN_779_787 Region = 3 + Region_EU_433 Region = 4 + Region_AU_915_928 Region = 5 + Region_CN_470_510 Region = 6 + Region_AS_923 Region = 7 + Region_KR_920_923 Region = 8 + Region_IN_865_867 Region = 9 + Region_RU_864_870 Region = 10 +) + +var Region_name = map[int32]string{ + 0: "UNKNOWN_REGION", + 1: "EU_863_870", + 2: "US_902_928", + 3: "CN_779_787", + 4: "EU_433", + 5: "AU_915_928", + 6: "CN_470_510", + 7: "AS_923", + 8: "KR_920_923", + 9: "IN_865_867", + 10: "RU_864_870", +} + +var Region_value = map[string]int32{ + "UNKNOWN_REGION": 0, + "EU_863_870": 1, + "US_902_928": 2, + "CN_779_787": 3, + "EU_433": 4, + "AU_915_928": 5, + "CN_470_510": 6, + "AS_923": 7, + "KR_920_923": 8, + "IN_865_867": 9, + "RU_864_870": 10, +} + +func (x Region) String() string { + return proto.EnumName(Region_name, int32(x)) +} + +func (Region) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_b73688cb78eded7f, []int{0} +} + +// LoRaWAN class for transmitting downlink. +type DownlinkMessageClass int32 + +const ( + DownlinkMessageClass_CLASS_A DownlinkMessageClass = 0 + DownlinkMessageClass_CLASS_B DownlinkMessageClass = 1 + DownlinkMessageClass_CLSAS_C DownlinkMessageClass = 2 +) + +var DownlinkMessageClass_name = map[int32]string{ + 0: "CLASS_A", + 1: "CLASS_B", + 2: "CLSAS_C", +} + +var DownlinkMessageClass_value = map[string]int32{ + "CLASS_A": 0, + "CLASS_B": 1, + "CLSAS_C": 2, +} + +func (x DownlinkMessageClass) String() string { + return proto.EnumName(DownlinkMessageClass_name, int32(x)) +} + +func (DownlinkMessageClass) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_b73688cb78eded7f, []int{1} +} + +// Priority of a downlink message. +type DownlinkMessagePriority int32 + +const ( + // Lowest priority. + DownlinkMessagePriority_LOWEST DownlinkMessagePriority = 0 + // Low priority. + DownlinkMessagePriority_LOW DownlinkMessagePriority = 1 + // Normal priority. + DownlinkMessagePriority_NORMAL DownlinkMessagePriority = 2 + // High priority. + // Sets the HiPriority flag in the LoRaWAN Backend Interfaces XmitDataReq message. + DownlinkMessagePriority_HIGH DownlinkMessagePriority = 3 + // Highest priority. + // Sets the HiPriority flag in the LoRaWAN Backend Interfaces XmitDataReq message. + DownlinkMessagePriority_HIGHEST DownlinkMessagePriority = 4 +) + +var DownlinkMessagePriority_name = map[int32]string{ + 0: "LOWEST", + 1: "LOW", + 2: "NORMAL", + 3: "HIGH", + 4: "HIGHEST", +} + +var DownlinkMessagePriority_value = map[string]int32{ + "LOWEST": 0, + "LOW": 1, + "NORMAL": 2, + "HIGH": 3, + "HIGHEST": 4, +} + +func (x DownlinkMessagePriority) String() string { + return proto.EnumName(DownlinkMessagePriority_name, int32(x)) +} + +func (DownlinkMessagePriority) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_b73688cb78eded7f, []int{2} +} + +type MessageDeliveryState int32 + +const ( + // The message has been accepted for forwarding or delivery. + MessageDeliveryState_ACCEPTED MessageDeliveryState = 0 + // The message has been forwarded to another host for delivery. + MessageDeliveryState_FORWARDED MessageDeliveryState = 1 + // The message has been delivered to the receiver. + MessageDeliveryState_DELIVERED MessageDeliveryState = 2 + // The message has been processed by the receiver. + MessageDeliveryState_PROCESSED MessageDeliveryState = 3 +) + +var MessageDeliveryState_name = map[int32]string{ + 0: "ACCEPTED", + 1: "FORWARDED", + 2: "DELIVERED", + 3: "PROCESSED", +} + +var MessageDeliveryState_value = map[string]int32{ + "ACCEPTED": 0, + "FORWARDED": 1, + "DELIVERED": 2, + "PROCESSED": 3, +} + +func (x MessageDeliveryState) String() string { + return proto.EnumName(MessageDeliveryState_name, int32(x)) +} + +func (MessageDeliveryState) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_b73688cb78eded7f, []int{3} +} + +type TerrestrialAntennaPlacement int32 + +const ( + // Unknown antenna placement. + TerrestrialAntennaPlacement_UNKNOWN_PLACEMENT TerrestrialAntennaPlacement = 0 + // Indoor antenna placement. + TerrestrialAntennaPlacement_INDOOR TerrestrialAntennaPlacement = 1 + // Outdoor antenna placement. + TerrestrialAntennaPlacement_OUTDOOR TerrestrialAntennaPlacement = 2 +) + +var TerrestrialAntennaPlacement_name = map[int32]string{ + 0: "UNKNOWN_PLACEMENT", + 1: "INDOOR", + 2: "OUTDOOR", +} + +var TerrestrialAntennaPlacement_value = map[string]int32{ + "UNKNOWN_PLACEMENT": 0, + "INDOOR": 1, + "OUTDOOR": 2, +} + +func (x TerrestrialAntennaPlacement) String() string { + return proto.EnumName(TerrestrialAntennaPlacement_name, int32(x)) +} + +func (TerrestrialAntennaPlacement) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_b73688cb78eded7f, []int{4} +} + +type Modulation int32 + +const ( + // LoRa modulation. + Modulation_LORA Modulation = 0 + // FSK modulation. + Modulation_FSK Modulation = 1 +) + +var Modulation_name = map[int32]string{ + 0: "LORA", + 1: "FSK", +} + +var Modulation_value = map[string]int32{ + "LORA": 0, + "FSK": 1, +} + +func (x Modulation) String() string { + return proto.EnumName(Modulation_name, int32(x)) +} + +func (Modulation) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_b73688cb78eded7f, []int{5} +} + +func init() { + proto.RegisterEnum("org.packetbroker.v1alpha1.Region", Region_name, Region_value) + proto.RegisterEnum("org.packetbroker.v1alpha1.DownlinkMessageClass", DownlinkMessageClass_name, DownlinkMessageClass_value) + proto.RegisterEnum("org.packetbroker.v1alpha1.DownlinkMessagePriority", DownlinkMessagePriority_name, DownlinkMessagePriority_value) + proto.RegisterEnum("org.packetbroker.v1alpha1.MessageDeliveryState", MessageDeliveryState_name, MessageDeliveryState_value) + proto.RegisterEnum("org.packetbroker.v1alpha1.TerrestrialAntennaPlacement", TerrestrialAntennaPlacement_name, TerrestrialAntennaPlacement_value) + proto.RegisterEnum("org.packetbroker.v1alpha1.Modulation", Modulation_name, Modulation_value) +} + +func init() { + proto.RegisterFile("packetbroker/api/v1alpha1/enums.proto", fileDescriptor_b73688cb78eded7f) +} + +var fileDescriptor_b73688cb78eded7f = []byte{ + // 510 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x92, 0xcf, 0x6e, 0xd3, 0x4e, + 0x10, 0xc7, 0xed, 0x24, 0xbf, 0x34, 0x9d, 0x1f, 0x54, 0x8b, 0x55, 0x84, 0x10, 0x92, 0x39, 0x71, + 0xb1, 0x44, 0xfe, 0x27, 0xb6, 0x85, 0x38, 0xb8, 0xf6, 0x36, 0x8d, 0xe2, 0xd8, 0xa9, 0x37, 0x26, + 0x12, 0x97, 0xd5, 0xb6, 0xac, 0x82, 0x15, 0xd7, 0x8e, 0xd6, 0x6e, 0x51, 0xdf, 0x82, 0x87, 0xe1, + 0x21, 0x38, 0xf6, 0xc8, 0x11, 0x25, 0x2f, 0x82, 0x36, 0x69, 0x45, 0xcb, 0xcd, 0x1f, 0xcf, 0x67, + 0x47, 0xdf, 0xd1, 0x0c, 0xbc, 0x5b, 0xb3, 0xcb, 0x15, 0x2f, 0x2f, 0x44, 0xbe, 0xe2, 0xa2, 0xc5, + 0xd6, 0x49, 0xeb, 0xa6, 0xc3, 0xd2, 0xf5, 0x57, 0xd6, 0x69, 0xf1, 0xec, 0xfa, 0xaa, 0x68, 0xae, + 0x45, 0x5e, 0xe6, 0xda, 0xeb, 0x5c, 0x2c, 0x9b, 0x8f, 0xd5, 0xe6, 0x83, 0x66, 0xfc, 0x50, 0xa1, + 0x1e, 0xf1, 0x65, 0x92, 0x67, 0x9a, 0x06, 0x47, 0x71, 0x30, 0x09, 0xc2, 0x45, 0x40, 0x23, 0x3c, + 0x1a, 0x87, 0x01, 0x52, 0xb4, 0x23, 0x00, 0x1c, 0x53, 0x6b, 0xd8, 0xa3, 0x96, 0xd9, 0x46, 0xaa, + 0xe4, 0x98, 0x50, 0xbb, 0xdd, 0xa5, 0x76, 0xd7, 0x42, 0x15, 0xc9, 0x6e, 0x40, 0x4d, 0xd3, 0xa6, + 0xa6, 0x65, 0xa2, 0xaa, 0x06, 0x50, 0xc7, 0x31, 0xed, 0xf7, 0x7a, 0xa8, 0x26, 0x6b, 0x4e, 0x4c, + 0xed, 0xce, 0x60, 0xe7, 0xfe, 0x77, 0xef, 0xf6, 0xcd, 0x36, 0x1d, 0x74, 0xda, 0xa8, 0x2e, 0x5d, + 0x87, 0x50, 0xbb, 0xdb, 0x43, 0x07, 0xb2, 0x36, 0x89, 0xa8, 0xdd, 0x6d, 0xef, 0xb8, 0x21, 0x79, + 0x1c, 0x50, 0x6b, 0x38, 0xa0, 0xd6, 0xd0, 0x44, 0x87, 0x92, 0x23, 0x99, 0xa3, 0xbf, 0xcb, 0x01, + 0xc6, 0x47, 0x38, 0xf6, 0xf2, 0x6f, 0x59, 0x9a, 0x64, 0xab, 0x29, 0x2f, 0x0a, 0xb6, 0xe4, 0x6e, + 0xca, 0x8a, 0x42, 0xfb, 0x1f, 0x0e, 0x5c, 0xdf, 0x21, 0x84, 0x3a, 0x48, 0xf9, 0x0b, 0x27, 0x48, + 0xdd, 0x03, 0x71, 0x08, 0x75, 0x51, 0xc5, 0x38, 0x87, 0x57, 0xff, 0x3c, 0x9f, 0x89, 0x24, 0x17, + 0x49, 0x79, 0x2b, 0x53, 0xf9, 0xe1, 0x02, 0x93, 0x39, 0x52, 0xb4, 0x03, 0xa8, 0xfa, 0xe1, 0x02, + 0xa9, 0xf2, 0x67, 0x10, 0x46, 0x53, 0xc7, 0x47, 0x15, 0xad, 0x01, 0xb5, 0xb3, 0xf1, 0xe8, 0x0c, + 0x55, 0x65, 0x4b, 0xf9, 0x25, 0xdd, 0x9a, 0x71, 0x0e, 0xc7, 0xf7, 0xad, 0x3c, 0x9e, 0x26, 0x37, + 0x5c, 0xdc, 0x92, 0x92, 0x95, 0x5c, 0x7b, 0x06, 0x0d, 0xc7, 0x75, 0xf1, 0x6c, 0x8e, 0x3d, 0xa4, + 0x68, 0xcf, 0xe1, 0xf0, 0x34, 0x8c, 0x16, 0x4e, 0xe4, 0x61, 0x0f, 0xa9, 0x12, 0x3d, 0xec, 0x8f, + 0x3f, 0xe1, 0x08, 0x7b, 0xa8, 0x22, 0x71, 0x16, 0x85, 0x2e, 0x26, 0x04, 0x7b, 0xa8, 0x6a, 0x4c, + 0xe1, 0xcd, 0x9c, 0x0b, 0xc1, 0x8b, 0x52, 0x24, 0x2c, 0x75, 0xb2, 0x92, 0x67, 0x19, 0x9b, 0xa5, + 0xec, 0x92, 0x5f, 0xf1, 0xac, 0xd4, 0x5e, 0xc2, 0x8b, 0x87, 0x7d, 0xcd, 0x7c, 0xc7, 0xc5, 0x53, + 0x1c, 0xc8, 0xd0, 0x00, 0xf5, 0x71, 0xe0, 0x85, 0x61, 0xb4, 0x1f, 0x3a, 0x8c, 0xe7, 0x3b, 0xa8, + 0x18, 0x6f, 0x01, 0xa6, 0xf9, 0x97, 0xeb, 0x94, 0x95, 0x72, 0xdb, 0x0d, 0xa8, 0xf9, 0x61, 0xe4, + 0xec, 0xa7, 0x3c, 0x25, 0x13, 0xa4, 0x9e, 0x8c, 0x7e, 0x6e, 0x74, 0xf5, 0x6e, 0xa3, 0xab, 0xbf, + 0x37, 0xba, 0xfa, 0x7d, 0xab, 0x2b, 0x77, 0x5b, 0x5d, 0xf9, 0xb5, 0xd5, 0x95, 0xcf, 0xef, 0x97, + 0xf9, 0xd3, 0xfb, 0xc9, 0xc5, 0xf2, 0xc9, 0xb9, 0x7d, 0x78, 0x5c, 0xbd, 0xa8, 0xef, 0xce, 0xae, + 0xf7, 0x27, 0x00, 0x00, 0xff, 0xff, 0xd8, 0x06, 0x5c, 0xb0, 0x9f, 0x02, 0x00, 0x00, +} diff --git a/v1alpha1/go.mod b/v1alpha1/go.mod new file mode 100644 index 0000000..8ed1def --- /dev/null +++ b/v1alpha1/go.mod @@ -0,0 +1,8 @@ +module go.packetbroker.org/api/v1alpha1 + +go 1.13 + +require ( + github.com/gogo/protobuf v1.3.1 + google.golang.org/grpc v1.25.1 +) diff --git a/v1alpha1/go.sum b/v1alpha1/go.sum new file mode 100644 index 0000000..548c173 --- /dev/null +++ b/v1alpha1/go.sum @@ -0,0 +1,52 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1 h1:wdKvqQk7IttEw92GoRyKG2IDrUIpgpj6H6m81yfeMW0= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/v1alpha1/keys.pb.go b/v1alpha1/keys.pb.go new file mode 100644 index 0000000..8898515 --- /dev/null +++ b/v1alpha1/keys.pb.go @@ -0,0 +1,730 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: packetbroker/api/v1alpha1/keys.proto + +package packetbroker + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Pointer to a Key on a Key Exchange. +type KeyPointer struct { + // Address of the Key Exchange. + KeyExchange string `protobuf:"bytes,1,opt,name=key_exchange,json=keyExchange,proto3" json:"key_exchange,omitempty"` + // Label of the Key. + Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` +} + +func (m *KeyPointer) Reset() { *m = KeyPointer{} } +func (m *KeyPointer) String() string { return proto.CompactTextString(m) } +func (*KeyPointer) ProtoMessage() {} +func (*KeyPointer) Descriptor() ([]byte, []int) { + return fileDescriptor_1bf5357c5d765333, []int{0} +} +func (m *KeyPointer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *KeyPointer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_KeyPointer.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *KeyPointer) XXX_Merge(src proto.Message) { + xxx_messageInfo_KeyPointer.Merge(m, src) +} +func (m *KeyPointer) XXX_Size() int { + return m.Size() +} +func (m *KeyPointer) XXX_DiscardUnknown() { + xxx_messageInfo_KeyPointer.DiscardUnknown(m) +} + +var xxx_messageInfo_KeyPointer proto.InternalMessageInfo + +func (m *KeyPointer) GetKeyExchange() string { + if m != nil { + return m.KeyExchange + } + return "" +} + +func (m *KeyPointer) GetLabel() string { + if m != nil { + return m.Label + } + return "" +} + +// Encrypted data. +type EncryptedData struct { + // Encrypted data encryption keys with which the value is encrypted using AES-256-GCM. + // The map key refers to the key encryption key. + DeksEncrypted map[string][]byte `protobuf:"bytes,1,rep,name=deks_encrypted,json=deksEncrypted,proto3" json:"deks_encrypted,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Encrypted data. + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *EncryptedData) Reset() { *m = EncryptedData{} } +func (m *EncryptedData) String() string { return proto.CompactTextString(m) } +func (*EncryptedData) ProtoMessage() {} +func (*EncryptedData) Descriptor() ([]byte, []int) { + return fileDescriptor_1bf5357c5d765333, []int{1} +} +func (m *EncryptedData) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EncryptedData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EncryptedData.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EncryptedData) XXX_Merge(src proto.Message) { + xxx_messageInfo_EncryptedData.Merge(m, src) +} +func (m *EncryptedData) XXX_Size() int { + return m.Size() +} +func (m *EncryptedData) XXX_DiscardUnknown() { + xxx_messageInfo_EncryptedData.DiscardUnknown(m) +} + +var xxx_messageInfo_EncryptedData proto.InternalMessageInfo + +func (m *EncryptedData) GetDeksEncrypted() map[string][]byte { + if m != nil { + return m.DeksEncrypted + } + return nil +} + +func (m *EncryptedData) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func init() { + proto.RegisterType((*KeyPointer)(nil), "org.packetbroker.v1alpha1.KeyPointer") + proto.RegisterType((*EncryptedData)(nil), "org.packetbroker.v1alpha1.EncryptedData") + proto.RegisterMapType((map[string][]byte)(nil), "org.packetbroker.v1alpha1.EncryptedData.DeksEncryptedEntry") +} + +func init() { + proto.RegisterFile("packetbroker/api/v1alpha1/keys.proto", fileDescriptor_1bf5357c5d765333) +} + +var fileDescriptor_1bf5357c5d765333 = []byte{ + // 278 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x29, 0x48, 0x4c, 0xce, + 0x4e, 0x2d, 0x49, 0x2a, 0xca, 0xcf, 0x4e, 0x2d, 0xd2, 0x4f, 0x2c, 0xc8, 0xd4, 0x2f, 0x33, 0x4c, + 0xcc, 0x29, 0xc8, 0x48, 0x34, 0xd4, 0xcf, 0x4e, 0xad, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0x92, 0xcc, 0x2f, 0x4a, 0xd7, 0x43, 0x56, 0xa9, 0x07, 0x53, 0xa5, 0xe4, 0xca, 0xc5, 0xe5, + 0x9d, 0x5a, 0x19, 0x90, 0x9f, 0x99, 0x57, 0x92, 0x5a, 0x24, 0xa4, 0xc8, 0xc5, 0x93, 0x9d, 0x5a, + 0x19, 0x9f, 0x5a, 0x91, 0x9c, 0x91, 0x98, 0x97, 0x9e, 0x2a, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, + 0xc4, 0x9d, 0x9d, 0x5a, 0xe9, 0x0a, 0x15, 0x12, 0x12, 0xe1, 0x62, 0xcd, 0x49, 0x4c, 0x4a, 0xcd, + 0x91, 0x60, 0x02, 0xcb, 0x41, 0x38, 0x4a, 0xa7, 0x19, 0xb9, 0x78, 0x5d, 0xf3, 0x92, 0x8b, 0x2a, + 0x0b, 0x4a, 0x52, 0x53, 0x5c, 0x12, 0x4b, 0x12, 0x85, 0x92, 0xb8, 0xf8, 0x52, 0x52, 0xb3, 0x8b, + 0xe3, 0x53, 0x61, 0xa2, 0x12, 0x8c, 0x0a, 0xcc, 0x1a, 0xdc, 0x46, 0xd6, 0x7a, 0x38, 0x1d, 0xa3, + 0x87, 0x62, 0x82, 0x9e, 0x4b, 0x6a, 0x76, 0x31, 0x5c, 0xc4, 0x35, 0xaf, 0xa4, 0xa8, 0x32, 0x88, + 0x37, 0x05, 0x59, 0x0c, 0xe4, 0x96, 0xb2, 0xc4, 0x9c, 0xd2, 0x54, 0xb0, 0x5b, 0x78, 0x82, 0x20, + 0x1c, 0x29, 0x07, 0x2e, 0x21, 0x4c, 0xad, 0x42, 0x02, 0x5c, 0xcc, 0xd9, 0xa9, 0x95, 0x50, 0x1f, + 0x81, 0x98, 0xd8, 0x75, 0x5b, 0x31, 0x59, 0x30, 0x3a, 0xb9, 0x9f, 0x78, 0x24, 0xc7, 0x78, 0xe1, + 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, + 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x6e, 0x7a, 0x3e, 0xaa, 0xdb, 0xf3, 0x8b, 0xd2, 0x51, 0x82, 0xdd, + 0x1a, 0x59, 0x36, 0x89, 0x0d, 0x1c, 0xfe, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x57, 0x14, + 0x94, 0xb2, 0xa7, 0x01, 0x00, 0x00, +} + +func (m *KeyPointer) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *KeyPointer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *KeyPointer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Label) > 0 { + i -= len(m.Label) + copy(dAtA[i:], m.Label) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Label))) + i-- + dAtA[i] = 0x12 + } + if len(m.KeyExchange) > 0 { + i -= len(m.KeyExchange) + copy(dAtA[i:], m.KeyExchange) + i = encodeVarintKeys(dAtA, i, uint64(len(m.KeyExchange))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EncryptedData) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EncryptedData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EncryptedData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintKeys(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.DeksEncrypted) > 0 { + for k := range m.DeksEncrypted { + v := m.DeksEncrypted[k] + baseI := i + if len(v) > 0 { + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintKeys(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintKeys(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintKeys(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintKeys(dAtA []byte, offset int, v uint64) int { + offset -= sovKeys(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *KeyPointer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.KeyExchange) + if l > 0 { + n += 1 + l + sovKeys(uint64(l)) + } + l = len(m.Label) + if l > 0 { + n += 1 + l + sovKeys(uint64(l)) + } + return n +} + +func (m *EncryptedData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.DeksEncrypted) > 0 { + for k, v := range m.DeksEncrypted { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovKeys(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovKeys(uint64(len(k))) + l + n += mapEntrySize + 1 + sovKeys(uint64(mapEntrySize)) + } + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovKeys(uint64(l)) + } + return n +} + +func sovKeys(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozKeys(x uint64) (n int) { + return sovKeys(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *KeyPointer) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: KeyPointer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KeyPointer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyExchange", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KeyExchange = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Label = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EncryptedData) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EncryptedData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EncryptedData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeksEncrypted", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DeksEncrypted == nil { + m.DeksEncrypted = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthKeys + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthKeys + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthKeys + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex < 0 { + return ErrInvalidLengthKeys + } + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.DeksEncrypted[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowKeys + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthKeys + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthKeys + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipKeys(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthKeys + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipKeys(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowKeys + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowKeys + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowKeys + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthKeys + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupKeys + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthKeys + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthKeys = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowKeys = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupKeys = fmt.Errorf("proto: unexpected end of group") +) diff --git a/v1alpha1/location.pb.go b/v1alpha1/location.pb.go new file mode 100644 index 0000000..418a59c --- /dev/null +++ b/v1alpha1/location.pb.go @@ -0,0 +1,636 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: packetbroker/api/v1alpha1/location.proto + +package packetbroker + +import ( + encoding_binary "encoding/binary" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + types "github.com/gogo/protobuf/types" + io "io" + math "math" + math_bits "math/bits" +) + +// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Location struct { + // The East-West position (degrees; -180 to +180), where 0 is the Prime Meridian (Greenwich), East is positive, West is negative. + Latitude float64 `protobuf:"fixed64,1,opt,name=latitude,proto3" json:"latitude,omitempty"` + // The North–South position (degrees; -90 to +90), where 0 is the equator, North pole is positive, South pole is negative. + Longitude float64 `protobuf:"fixed64,2,opt,name=longitude,proto3" json:"longitude,omitempty"` + // Altitude (meters), where 0 is the mean sea level. + Altitude float32 `protobuf:"fixed32,3,opt,name=altitude,proto3" json:"altitude,omitempty"` + // Accuracy of the location (meters). + Accuracy float32 `protobuf:"fixed32,4,opt,name=accuracy,proto3" json:"accuracy,omitempty"` +} + +func (m *Location) Reset() { *m = Location{} } +func (m *Location) String() string { return proto.CompactTextString(m) } +func (*Location) ProtoMessage() {} +func (*Location) Descriptor() ([]byte, []int) { + return fileDescriptor_b3a62951c3b95ddc, []int{0} +} +func (m *Location) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Location.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Location) XXX_Merge(src proto.Message) { + xxx_messageInfo_Location.Merge(m, src) +} +func (m *Location) XXX_Size() int { + return m.Size() +} +func (m *Location) XXX_DiscardUnknown() { + xxx_messageInfo_Location.DiscardUnknown(m) +} + +var xxx_messageInfo_Location proto.InternalMessageInfo + +func (m *Location) GetLatitude() float64 { + if m != nil { + return m.Latitude + } + return 0 +} + +func (m *Location) GetLongitude() float64 { + if m != nil { + return m.Longitude + } + return 0 +} + +func (m *Location) GetAltitude() float32 { + if m != nil { + return m.Altitude + } + return 0 +} + +func (m *Location) GetAccuracy() float32 { + if m != nil { + return m.Accuracy + } + return 0 +} + +type TimedLocation struct { + Time *types.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` + Location *Location `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` +} + +func (m *TimedLocation) Reset() { *m = TimedLocation{} } +func (m *TimedLocation) String() string { return proto.CompactTextString(m) } +func (*TimedLocation) ProtoMessage() {} +func (*TimedLocation) Descriptor() ([]byte, []int) { + return fileDescriptor_b3a62951c3b95ddc, []int{1} +} +func (m *TimedLocation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TimedLocation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TimedLocation.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TimedLocation) XXX_Merge(src proto.Message) { + xxx_messageInfo_TimedLocation.Merge(m, src) +} +func (m *TimedLocation) XXX_Size() int { + return m.Size() +} +func (m *TimedLocation) XXX_DiscardUnknown() { + xxx_messageInfo_TimedLocation.DiscardUnknown(m) +} + +var xxx_messageInfo_TimedLocation proto.InternalMessageInfo + +func (m *TimedLocation) GetTime() *types.Timestamp { + if m != nil { + return m.Time + } + return nil +} + +func (m *TimedLocation) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func init() { + proto.RegisterType((*Location)(nil), "org.packetbroker.v1alpha1.Location") + proto.RegisterType((*TimedLocation)(nil), "org.packetbroker.v1alpha1.TimedLocation") +} + +func init() { + proto.RegisterFile("packetbroker/api/v1alpha1/location.proto", fileDescriptor_b3a62951c3b95ddc) +} + +var fileDescriptor_b3a62951c3b95ddc = []byte{ + // 279 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x28, 0x48, 0x4c, 0xce, + 0x4e, 0x2d, 0x49, 0x2a, 0xca, 0xcf, 0x4e, 0x2d, 0xd2, 0x4f, 0x2c, 0xc8, 0xd4, 0x2f, 0x33, 0x4c, + 0xcc, 0x29, 0xc8, 0x48, 0x34, 0xd4, 0xcf, 0xc9, 0x4f, 0x4e, 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x2b, + 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0xcc, 0x2f, 0x4a, 0xd7, 0x43, 0x56, 0xad, 0x07, 0x53, 0x29, + 0x25, 0x9f, 0x9e, 0x9f, 0x9f, 0x9e, 0x93, 0xaa, 0x0f, 0x56, 0x98, 0x54, 0x9a, 0xa6, 0x5f, 0x92, + 0x99, 0x9b, 0x5a, 0x5c, 0x92, 0x98, 0x5b, 0x00, 0xd1, 0xab, 0x54, 0xc3, 0xc5, 0xe1, 0x03, 0x35, + 0x4d, 0x48, 0x8a, 0x8b, 0x23, 0x27, 0xb1, 0x24, 0xb3, 0xa4, 0x34, 0x25, 0x55, 0x82, 0x51, 0x81, + 0x51, 0x83, 0x31, 0x08, 0xce, 0x17, 0x92, 0xe1, 0xe2, 0xcc, 0xc9, 0xcf, 0x4b, 0x87, 0x48, 0x32, + 0x81, 0x25, 0x11, 0x02, 0x20, 0x9d, 0x89, 0x39, 0x50, 0x9d, 0xcc, 0x0a, 0x8c, 0x1a, 0x4c, 0x41, + 0x70, 0x3e, 0x58, 0x2e, 0x39, 0xb9, 0xb4, 0x28, 0x31, 0xb9, 0x52, 0x82, 0x05, 0x2a, 0x07, 0xe5, + 0x2b, 0x35, 0x30, 0x72, 0xf1, 0x86, 0x64, 0xe6, 0xa6, 0xa6, 0xc0, 0xdd, 0xa0, 0xc7, 0xc5, 0x02, + 0x72, 0x22, 0xd8, 0x7e, 0x6e, 0x23, 0x29, 0x3d, 0x88, 0xfb, 0xf5, 0x60, 0xee, 0xd7, 0x0b, 0x81, + 0xb9, 0x3f, 0x08, 0xac, 0x4e, 0xc8, 0x9e, 0x8b, 0x03, 0x16, 0x1a, 0x60, 0x67, 0x71, 0x1b, 0x29, + 0xeb, 0xe1, 0x0c, 0x0e, 0x3d, 0x98, 0x35, 0x41, 0x70, 0x4d, 0x4e, 0xee, 0x27, 0x1e, 0xc9, 0x31, + 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, + 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x9b, 0x9e, 0x8f, 0x6a, 0x4c, 0x7e, 0x51, 0x3a, 0x4a, + 0x3c, 0x58, 0x23, 0xcb, 0x26, 0xb1, 0x81, 0xdd, 0x68, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x1c, + 0xe9, 0x9d, 0x40, 0xb8, 0x01, 0x00, 0x00, +} + +func (m *Location) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Location) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Location) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Accuracy != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Accuracy)))) + i-- + dAtA[i] = 0x25 + } + if m.Altitude != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Altitude)))) + i-- + dAtA[i] = 0x1d + } + if m.Longitude != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Longitude)))) + i-- + dAtA[i] = 0x11 + } + if m.Latitude != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Latitude)))) + i-- + dAtA[i] = 0x9 + } + return len(dAtA) - i, nil +} + +func (m *TimedLocation) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TimedLocation) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TimedLocation) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Location != nil { + { + size, err := m.Location.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLocation(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Time != nil { + { + size, err := m.Time.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLocation(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintLocation(dAtA []byte, offset int, v uint64) int { + offset -= sovLocation(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Location) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Latitude != 0 { + n += 9 + } + if m.Longitude != 0 { + n += 9 + } + if m.Altitude != 0 { + n += 5 + } + if m.Accuracy != 0 { + n += 5 + } + return n +} + +func (m *TimedLocation) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Time != nil { + l = m.Time.Size() + n += 1 + l + sovLocation(uint64(l)) + } + if m.Location != nil { + l = m.Location.Size() + n += 1 + l + sovLocation(uint64(l)) + } + return n +} + +func sovLocation(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozLocation(x uint64) (n int) { + return sovLocation(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Location) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLocation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Location: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Location: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Latitude", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Latitude = float64(math.Float64frombits(v)) + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Longitude", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Longitude = float64(math.Float64frombits(v)) + case 3: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Altitude", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Altitude = float32(math.Float32frombits(v)) + case 4: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Accuracy", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Accuracy = float32(math.Float32frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipLocation(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLocation + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthLocation + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TimedLocation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLocation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TimedLocation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TimedLocation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLocation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLocation + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLocation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Time == nil { + m.Time = &types.Timestamp{} + } + if err := m.Time.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLocation + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLocation + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLocation + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Location == nil { + m.Location = &Location{} + } + if err := m.Location.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLocation(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLocation + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthLocation + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipLocation(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowLocation + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowLocation + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowLocation + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthLocation + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupLocation + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthLocation + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthLocation = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowLocation = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupLocation = fmt.Errorf("proto: unexpected end of group") +) diff --git a/v1alpha1/mapping.pb.go b/v1alpha1/mapping.pb.go new file mode 100644 index 0000000..0e09d81 --- /dev/null +++ b/v1alpha1/mapping.pb.go @@ -0,0 +1,2850 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: packetbroker/api/v1alpha1/mapping.proto + +package packetbroker + +import ( + encoding_binary "encoding/binary" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + types "github.com/gogo/protobuf/types" + io "io" + math "math" + math_bits "math/bits" +) + +// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type GatewayVisibility struct { + // Show location. + Location bool `protobuf:"varint,1,opt,name=location,proto3" json:"location,omitempty"` + // Show antenna placement (indoor/outdoor). + AntennaPlacement bool `protobuf:"varint,2,opt,name=antenna_placement,json=antennaPlacement,proto3" json:"antenna_placement,omitempty"` + // Show antenna count. + AntennaCount bool `protobuf:"varint,3,opt,name=antenna_count,json=antennaCount,proto3" json:"antenna_count,omitempty"` + // Show whether the gateway produces fine timestamps. + FineTimestamps bool `protobuf:"varint,4,opt,name=fine_timestamps,json=fineTimestamps,proto3" json:"fine_timestamps,omitempty"` + // Show contact information. + ContactInformation bool `protobuf:"varint,5,opt,name=contact_information,json=contactInformation,proto3" json:"contact_information,omitempty"` + // Show status (online/offline). + Status bool `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"` + // Show receive and transmission counters. + Counters bool `protobuf:"varint,7,opt,name=counters,proto3" json:"counters,omitempty"` + // Show frequency plan. + FrequencyPlan bool `protobuf:"varint,8,opt,name=frequency_plan,json=frequencyPlan,proto3" json:"frequency_plan,omitempty"` +} + +func (m *GatewayVisibility) Reset() { *m = GatewayVisibility{} } +func (m *GatewayVisibility) String() string { return proto.CompactTextString(m) } +func (*GatewayVisibility) ProtoMessage() {} +func (*GatewayVisibility) Descriptor() ([]byte, []int) { + return fileDescriptor_baa01a765a1ee4eb, []int{0} +} +func (m *GatewayVisibility) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GatewayVisibility) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GatewayVisibility.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GatewayVisibility) XXX_Merge(src proto.Message) { + xxx_messageInfo_GatewayVisibility.Merge(m, src) +} +func (m *GatewayVisibility) XXX_Size() int { + return m.Size() +} +func (m *GatewayVisibility) XXX_DiscardUnknown() { + xxx_messageInfo_GatewayVisibility.DiscardUnknown(m) +} + +var xxx_messageInfo_GatewayVisibility proto.InternalMessageInfo + +func (m *GatewayVisibility) GetLocation() bool { + if m != nil { + return m.Location + } + return false +} + +func (m *GatewayVisibility) GetAntennaPlacement() bool { + if m != nil { + return m.AntennaPlacement + } + return false +} + +func (m *GatewayVisibility) GetAntennaCount() bool { + if m != nil { + return m.AntennaCount + } + return false +} + +func (m *GatewayVisibility) GetFineTimestamps() bool { + if m != nil { + return m.FineTimestamps + } + return false +} + +func (m *GatewayVisibility) GetContactInformation() bool { + if m != nil { + return m.ContactInformation + } + return false +} + +func (m *GatewayVisibility) GetStatus() bool { + if m != nil { + return m.Status + } + return false +} + +func (m *GatewayVisibility) GetCounters() bool { + if m != nil { + return m.Counters + } + return false +} + +func (m *GatewayVisibility) GetFrequencyPlan() bool { + if m != nil { + return m.FrequencyPlan + } + return false +} + +type GatewayFrequencyPlan struct { + // Region of the frequency plan. + Region Region `protobuf:"varint,1,opt,name=region,proto3,enum=org.packetbroker.v1alpha1.Region" json:"region,omitempty"` + UplinkChannels []*GatewayFrequencyPlan_Channel `protobuf:"bytes,2,rep,name=uplink_channels,json=uplinkChannels,proto3" json:"uplink_channels,omitempty"` +} + +func (m *GatewayFrequencyPlan) Reset() { *m = GatewayFrequencyPlan{} } +func (m *GatewayFrequencyPlan) String() string { return proto.CompactTextString(m) } +func (*GatewayFrequencyPlan) ProtoMessage() {} +func (*GatewayFrequencyPlan) Descriptor() ([]byte, []int) { + return fileDescriptor_baa01a765a1ee4eb, []int{1} +} +func (m *GatewayFrequencyPlan) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GatewayFrequencyPlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GatewayFrequencyPlan.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GatewayFrequencyPlan) XXX_Merge(src proto.Message) { + xxx_messageInfo_GatewayFrequencyPlan.Merge(m, src) +} +func (m *GatewayFrequencyPlan) XXX_Size() int { + return m.Size() +} +func (m *GatewayFrequencyPlan) XXX_DiscardUnknown() { + xxx_messageInfo_GatewayFrequencyPlan.DiscardUnknown(m) +} + +var xxx_messageInfo_GatewayFrequencyPlan proto.InternalMessageInfo + +func (m *GatewayFrequencyPlan) GetRegion() Region { + if m != nil { + return m.Region + } + return Region_UNKNOWN_REGION +} + +func (m *GatewayFrequencyPlan) GetUplinkChannels() []*GatewayFrequencyPlan_Channel { + if m != nil { + return m.UplinkChannels + } + return nil +} + +type GatewayFrequencyPlan_Channel struct { + // Frequency (Hz). + Frequency uint64 `protobuf:"varint,1,opt,name=frequency,proto3" json:"frequency,omitempty"` + // Minimum data rate. + MinDataRate uint32 `protobuf:"varint,2,opt,name=min_data_rate,json=minDataRate,proto3" json:"min_data_rate,omitempty"` + // Maximum data rate. + MaxDataRate uint32 `protobuf:"varint,3,opt,name=max_data_rate,json=maxDataRate,proto3" json:"max_data_rate,omitempty"` + // Modulation. + Modulation Modulation `protobuf:"varint,4,opt,name=modulation,proto3,enum=org.packetbroker.v1alpha1.Modulation" json:"modulation,omitempty"` +} + +func (m *GatewayFrequencyPlan_Channel) Reset() { *m = GatewayFrequencyPlan_Channel{} } +func (m *GatewayFrequencyPlan_Channel) String() string { return proto.CompactTextString(m) } +func (*GatewayFrequencyPlan_Channel) ProtoMessage() {} +func (*GatewayFrequencyPlan_Channel) Descriptor() ([]byte, []int) { + return fileDescriptor_baa01a765a1ee4eb, []int{1, 0} +} +func (m *GatewayFrequencyPlan_Channel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GatewayFrequencyPlan_Channel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GatewayFrequencyPlan_Channel.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GatewayFrequencyPlan_Channel) XXX_Merge(src proto.Message) { + xxx_messageInfo_GatewayFrequencyPlan_Channel.Merge(m, src) +} +func (m *GatewayFrequencyPlan_Channel) XXX_Size() int { + return m.Size() +} +func (m *GatewayFrequencyPlan_Channel) XXX_DiscardUnknown() { + xxx_messageInfo_GatewayFrequencyPlan_Channel.DiscardUnknown(m) +} + +var xxx_messageInfo_GatewayFrequencyPlan_Channel proto.InternalMessageInfo + +func (m *GatewayFrequencyPlan_Channel) GetFrequency() uint64 { + if m != nil { + return m.Frequency + } + return 0 +} + +func (m *GatewayFrequencyPlan_Channel) GetMinDataRate() uint32 { + if m != nil { + return m.MinDataRate + } + return 0 +} + +func (m *GatewayFrequencyPlan_Channel) GetMaxDataRate() uint32 { + if m != nil { + return m.MaxDataRate + } + return 0 +} + +func (m *GatewayFrequencyPlan_Channel) GetModulation() Modulation { + if m != nil { + return m.Modulation + } + return Modulation_LORA +} + +type Gateway struct { + // LoRa Alliance NetID of the Forwarder Member. + ForwarderNetId uint32 `protobuf:"varint,1,opt,name=forwarder_net_id,json=forwarderNetId,proto3" json:"forwarder_net_id,omitempty"` + // Forwarder identifier issued by the Forwarder Member. + ForwarderId string `protobuf:"bytes,2,opt,name=forwarder_id,json=forwarderId,proto3" json:"forwarder_id,omitempty"` + // Unique identifier of the gateway. + Eui uint64 `protobuf:"fixed64,3,opt,name=eui,proto3" json:"eui,omitempty"` + // Timestamp when the gateway was last updated. + UpdatedAt *types.Timestamp `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + // Types that are valid to be assigned to Location: + // *Gateway_Terrestrial_ + // *Gateway_Satellite_ + Location isGateway_Location `protobuf_oneof:"location"` + // Contact name. + // Subscribing Home Networks receive this value if the Gateway Visibility has contact_information set. + ContactName string `protobuf:"bytes,7,opt,name=contact_name,json=contactName,proto3" json:"contact_name,omitempty"` + // Contact email address. + // Subscribing Home Networks receive this value if the Gateway Visibility has contact_information set. + ContactEmail string `protobuf:"bytes,8,opt,name=contact_email,json=contactEmail,proto3" json:"contact_email,omitempty"` + // Contact URL. + // Subscribing Home Networks receive this value if the Gateway Visibility has contact_information set. + ContactUrl string `protobuf:"bytes,9,opt,name=contact_url,json=contactUrl,proto3" json:"contact_url,omitempty"` + // Indicates whether the gateway is online. + // Subscribing Home Networks receive this value if the Gateway Visibility has status set. + Online *types.BoolValue `protobuf:"bytes,10,opt,name=online,proto3" json:"online,omitempty"` + // Total number of received messages. + // Subscribing Home Networks receive this value if the Gateway Visibility has counters set. + RxCount *types.UInt64Value `protobuf:"bytes,11,opt,name=rx_count,json=rxCount,proto3" json:"rx_count,omitempty"` + // Number of transmitted messages. + // Subscribing Home Networks receive this value if the Gateway Visibility has counters set. + TxCount *types.UInt64Value `protobuf:"bytes,12,opt,name=tx_count,json=txCount,proto3" json:"tx_count,omitempty"` + // Frequency plan of the gateway. + // Subscribing Home Networks receive this value if the Gateway Visibility has frequency_plan set. + FrequencyPlan *GatewayFrequencyPlan `protobuf:"bytes,13,opt,name=frequency_plan,json=frequencyPlan,proto3" json:"frequency_plan,omitempty"` +} + +func (m *Gateway) Reset() { *m = Gateway{} } +func (m *Gateway) String() string { return proto.CompactTextString(m) } +func (*Gateway) ProtoMessage() {} +func (*Gateway) Descriptor() ([]byte, []int) { + return fileDescriptor_baa01a765a1ee4eb, []int{2} +} +func (m *Gateway) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Gateway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Gateway.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Gateway) XXX_Merge(src proto.Message) { + xxx_messageInfo_Gateway.Merge(m, src) +} +func (m *Gateway) XXX_Size() int { + return m.Size() +} +func (m *Gateway) XXX_DiscardUnknown() { + xxx_messageInfo_Gateway.DiscardUnknown(m) +} + +var xxx_messageInfo_Gateway proto.InternalMessageInfo + +type isGateway_Location interface { + isGateway_Location() + MarshalTo([]byte) (int, error) + Size() int +} + +type Gateway_Terrestrial_ struct { + Terrestrial *Gateway_Terrestrial `protobuf:"bytes,5,opt,name=terrestrial,proto3,oneof" json:"terrestrial,omitempty"` +} +type Gateway_Satellite_ struct { + Satellite *Gateway_Satellite `protobuf:"bytes,6,opt,name=satellite,proto3,oneof" json:"satellite,omitempty"` +} + +func (*Gateway_Terrestrial_) isGateway_Location() {} +func (*Gateway_Satellite_) isGateway_Location() {} + +func (m *Gateway) GetLocation() isGateway_Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *Gateway) GetForwarderNetId() uint32 { + if m != nil { + return m.ForwarderNetId + } + return 0 +} + +func (m *Gateway) GetForwarderId() string { + if m != nil { + return m.ForwarderId + } + return "" +} + +func (m *Gateway) GetEui() uint64 { + if m != nil { + return m.Eui + } + return 0 +} + +func (m *Gateway) GetUpdatedAt() *types.Timestamp { + if m != nil { + return m.UpdatedAt + } + return nil +} + +func (m *Gateway) GetTerrestrial() *Gateway_Terrestrial { + if x, ok := m.GetLocation().(*Gateway_Terrestrial_); ok { + return x.Terrestrial + } + return nil +} + +func (m *Gateway) GetSatellite() *Gateway_Satellite { + if x, ok := m.GetLocation().(*Gateway_Satellite_); ok { + return x.Satellite + } + return nil +} + +func (m *Gateway) GetContactName() string { + if m != nil { + return m.ContactName + } + return "" +} + +func (m *Gateway) GetContactEmail() string { + if m != nil { + return m.ContactEmail + } + return "" +} + +func (m *Gateway) GetContactUrl() string { + if m != nil { + return m.ContactUrl + } + return "" +} + +func (m *Gateway) GetOnline() *types.BoolValue { + if m != nil { + return m.Online + } + return nil +} + +func (m *Gateway) GetRxCount() *types.UInt64Value { + if m != nil { + return m.RxCount + } + return nil +} + +func (m *Gateway) GetTxCount() *types.UInt64Value { + if m != nil { + return m.TxCount + } + return nil +} + +func (m *Gateway) GetFrequencyPlan() *GatewayFrequencyPlan { + if m != nil { + return m.FrequencyPlan + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Gateway) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Gateway_Terrestrial_)(nil), + (*Gateway_Satellite_)(nil), + } +} + +type Gateway_Terrestrial struct { + // Location of the (first) antenna. + // Subscribing Home Networks receive this value if the Gateway Visibility has location set. + Location *Location `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"` + // Antenna placement (indoor/outdoor). + // Subscribing Home Networks receive this value if the Gateway Visibility has antenna_placement set. + AntennaPlacement TerrestrialAntennaPlacement `protobuf:"varint,2,opt,name=antenna_placement,json=antennaPlacement,proto3,enum=org.packetbroker.v1alpha1.TerrestrialAntennaPlacement" json:"antenna_placement,omitempty"` + // Number of antennas. + // Subscribing Home Networks receive this value if the Gateway Visibility has antenna_count set. + AntennaCount *types.UInt32Value `protobuf:"bytes,3,opt,name=antenna_count,json=antennaCount,proto3" json:"antenna_count,omitempty"` + // Indicates whether the gateway produces fine timestamps. + // Subscribing Home Networks receive this value if the Gateway Visibility has fine_timestamps set. + FineTimestamps *types.BoolValue `protobuf:"bytes,4,opt,name=fine_timestamps,json=fineTimestamps,proto3" json:"fine_timestamps,omitempty"` +} + +func (m *Gateway_Terrestrial) Reset() { *m = Gateway_Terrestrial{} } +func (m *Gateway_Terrestrial) String() string { return proto.CompactTextString(m) } +func (*Gateway_Terrestrial) ProtoMessage() {} +func (*Gateway_Terrestrial) Descriptor() ([]byte, []int) { + return fileDescriptor_baa01a765a1ee4eb, []int{2, 0} +} +func (m *Gateway_Terrestrial) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Gateway_Terrestrial) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Gateway_Terrestrial.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Gateway_Terrestrial) XXX_Merge(src proto.Message) { + xxx_messageInfo_Gateway_Terrestrial.Merge(m, src) +} +func (m *Gateway_Terrestrial) XXX_Size() int { + return m.Size() +} +func (m *Gateway_Terrestrial) XXX_DiscardUnknown() { + xxx_messageInfo_Gateway_Terrestrial.DiscardUnknown(m) +} + +var xxx_messageInfo_Gateway_Terrestrial proto.InternalMessageInfo + +func (m *Gateway_Terrestrial) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *Gateway_Terrestrial) GetAntennaPlacement() TerrestrialAntennaPlacement { + if m != nil { + return m.AntennaPlacement + } + return TerrestrialAntennaPlacement_UNKNOWN_PLACEMENT +} + +func (m *Gateway_Terrestrial) GetAntennaCount() *types.UInt32Value { + if m != nil { + return m.AntennaCount + } + return nil +} + +func (m *Gateway_Terrestrial) GetFineTimestamps() *types.BoolValue { + if m != nil { + return m.FineTimestamps + } + return nil +} + +type Gateway_Satellite struct { + // Satellite location. + // Subscribing Home Networks receive this value if the Gateway Visibility has location set. + Location *Location `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"` + // Field of view (meters). + // Subscribing Home Networks receive this value if the Gateway Visibility has location set. + FieldOfView float64 `protobuf:"fixed64,2,opt,name=field_of_view,json=fieldOfView,proto3" json:"field_of_view,omitempty"` + // Trajectory, typically containing the recent past and projected path. + // Subscribing Home Networks receive this value if the Gateway Visibility has location set. + Trajectory []*TimedLocation `protobuf:"bytes,3,rep,name=trajectory,proto3" json:"trajectory,omitempty"` +} + +func (m *Gateway_Satellite) Reset() { *m = Gateway_Satellite{} } +func (m *Gateway_Satellite) String() string { return proto.CompactTextString(m) } +func (*Gateway_Satellite) ProtoMessage() {} +func (*Gateway_Satellite) Descriptor() ([]byte, []int) { + return fileDescriptor_baa01a765a1ee4eb, []int{2, 1} +} +func (m *Gateway_Satellite) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Gateway_Satellite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Gateway_Satellite.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Gateway_Satellite) XXX_Merge(src proto.Message) { + xxx_messageInfo_Gateway_Satellite.Merge(m, src) +} +func (m *Gateway_Satellite) XXX_Size() int { + return m.Size() +} +func (m *Gateway_Satellite) XXX_DiscardUnknown() { + xxx_messageInfo_Gateway_Satellite.DiscardUnknown(m) +} + +var xxx_messageInfo_Gateway_Satellite proto.InternalMessageInfo + +func (m *Gateway_Satellite) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *Gateway_Satellite) GetFieldOfView() float64 { + if m != nil { + return m.FieldOfView + } + return 0 +} + +func (m *Gateway_Satellite) GetTrajectory() []*TimedLocation { + if m != nil { + return m.Trajectory + } + return nil +} + +type Gateways struct { + Gateways []*Gateway `protobuf:"bytes,1,rep,name=gateways,proto3" json:"gateways,omitempty"` +} + +func (m *Gateways) Reset() { *m = Gateways{} } +func (m *Gateways) String() string { return proto.CompactTextString(m) } +func (*Gateways) ProtoMessage() {} +func (*Gateways) Descriptor() ([]byte, []int) { + return fileDescriptor_baa01a765a1ee4eb, []int{3} +} +func (m *Gateways) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Gateways) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Gateways.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Gateways) XXX_Merge(src proto.Message) { + xxx_messageInfo_Gateways.Merge(m, src) +} +func (m *Gateways) XXX_Size() int { + return m.Size() +} +func (m *Gateways) XXX_DiscardUnknown() { + xxx_messageInfo_Gateways.DiscardUnknown(m) +} + +var xxx_messageInfo_Gateways proto.InternalMessageInfo + +func (m *Gateways) GetGateways() []*Gateway { + if m != nil { + return m.Gateways + } + return nil +} + +func init() { + proto.RegisterType((*GatewayVisibility)(nil), "org.packetbroker.v1alpha1.GatewayVisibility") + proto.RegisterType((*GatewayFrequencyPlan)(nil), "org.packetbroker.v1alpha1.GatewayFrequencyPlan") + proto.RegisterType((*GatewayFrequencyPlan_Channel)(nil), "org.packetbroker.v1alpha1.GatewayFrequencyPlan.Channel") + proto.RegisterType((*Gateway)(nil), "org.packetbroker.v1alpha1.Gateway") + proto.RegisterType((*Gateway_Terrestrial)(nil), "org.packetbroker.v1alpha1.Gateway.Terrestrial") + proto.RegisterType((*Gateway_Satellite)(nil), "org.packetbroker.v1alpha1.Gateway.Satellite") + proto.RegisterType((*Gateways)(nil), "org.packetbroker.v1alpha1.Gateways") +} + +func init() { + proto.RegisterFile("packetbroker/api/v1alpha1/mapping.proto", fileDescriptor_baa01a765a1ee4eb) +} + +var fileDescriptor_baa01a765a1ee4eb = []byte{ + // 917 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xdf, 0x6e, 0x1b, 0x45, + 0x14, 0xc6, 0xfd, 0x27, 0x38, 0xf6, 0xd9, 0xd8, 0x4d, 0x07, 0x84, 0x16, 0xab, 0x72, 0x5b, 0x57, + 0x51, 0x2d, 0x01, 0x6b, 0xd5, 0x45, 0x8d, 0x2a, 0x24, 0x50, 0x12, 0x4a, 0x13, 0x54, 0x4a, 0x35, + 0xb4, 0xb9, 0xe0, 0x66, 0x99, 0xec, 0x8e, 0xdd, 0x21, 0xb3, 0x33, 0xcb, 0xec, 0x6c, 0x9d, 0xbc, + 0x05, 0xef, 0x82, 0xd4, 0x0b, 0x78, 0x01, 0x2e, 0x7b, 0xc9, 0x25, 0x4a, 0x6e, 0x79, 0x08, 0xe4, + 0xd9, 0xd9, 0xf5, 0xc6, 0x8d, 0xdd, 0xa0, 0xde, 0x79, 0xce, 0xfc, 0xbe, 0xb3, 0x67, 0xce, 0x9c, + 0xf9, 0x0c, 0x77, 0x63, 0x12, 0x1c, 0x53, 0x7d, 0xa4, 0xe4, 0x31, 0x55, 0x43, 0x12, 0xb3, 0xe1, + 0xab, 0x7b, 0x84, 0xc7, 0x2f, 0xc9, 0xbd, 0x61, 0x44, 0xe2, 0x98, 0x89, 0x89, 0x17, 0x2b, 0xa9, + 0x25, 0xfa, 0x44, 0xaa, 0x89, 0x57, 0x86, 0xbd, 0x1c, 0xec, 0xde, 0x9c, 0x48, 0x39, 0xe1, 0x74, + 0x68, 0xc0, 0xa3, 0x74, 0x3c, 0xd4, 0x2c, 0xa2, 0x89, 0x26, 0x51, 0x9c, 0x69, 0xbb, 0xbd, 0x45, + 0x60, 0xaa, 0x48, 0x1c, 0x53, 0x95, 0xd8, 0xfd, 0xad, 0xe5, 0x45, 0x50, 0x91, 0x46, 0x39, 0x36, + 0x58, 0x8e, 0x71, 0x19, 0x10, 0xcd, 0xa4, 0xc8, 0xc8, 0xfe, 0xeb, 0x1a, 0x5c, 0x7f, 0x4c, 0x34, + 0x9d, 0x92, 0xd3, 0x43, 0x96, 0xb0, 0x23, 0xc6, 0x99, 0x3e, 0x45, 0x5d, 0x68, 0xe6, 0x9c, 0x5b, + 0xbd, 0x55, 0x1d, 0x34, 0x71, 0xb1, 0x46, 0x9f, 0xc2, 0x75, 0x22, 0x34, 0x15, 0x82, 0xf8, 0x31, + 0x27, 0x01, 0x8d, 0xa8, 0xd0, 0x6e, 0xcd, 0x40, 0x9b, 0x76, 0xe3, 0x59, 0x1e, 0x47, 0x77, 0xa0, + 0x9d, 0xc3, 0x81, 0x4c, 0x85, 0x76, 0xeb, 0x06, 0xdc, 0xb0, 0xc1, 0xbd, 0x59, 0x0c, 0xdd, 0x85, + 0x6b, 0x63, 0x26, 0xa8, 0x5f, 0x34, 0x23, 0x71, 0xd7, 0x0c, 0xd6, 0x99, 0x85, 0x9f, 0x17, 0x51, + 0x34, 0x84, 0x0f, 0x03, 0x29, 0x34, 0x09, 0xb4, 0xcf, 0xc4, 0x58, 0xaa, 0x28, 0xab, 0xf0, 0x03, + 0x03, 0x23, 0xbb, 0x75, 0x30, 0xdf, 0x41, 0x1f, 0x43, 0x23, 0xd1, 0x44, 0xa7, 0x89, 0xdb, 0x30, + 0x8c, 0x5d, 0xcd, 0xce, 0x67, 0xca, 0xa1, 0x2a, 0x71, 0xd7, 0xb3, 0xf3, 0xe5, 0x6b, 0xb4, 0x05, + 0x9d, 0xb1, 0xa2, 0xbf, 0xa6, 0x54, 0x04, 0xa7, 0xb3, 0x13, 0x0a, 0xb7, 0x69, 0x88, 0x76, 0x11, + 0x7d, 0xc6, 0x89, 0xe8, 0xff, 0x5b, 0x83, 0x8f, 0x6c, 0xe3, 0xbe, 0x2d, 0x6f, 0xa0, 0x87, 0xd0, + 0x50, 0x74, 0x92, 0x77, 0xae, 0x33, 0xba, 0xed, 0x2d, 0x9d, 0x07, 0x0f, 0x1b, 0x10, 0x5b, 0x01, + 0xfa, 0x19, 0xae, 0xa5, 0x31, 0x67, 0xe2, 0xd8, 0x0f, 0x5e, 0x12, 0x21, 0x28, 0x4f, 0xdc, 0xda, + 0xad, 0xfa, 0xc0, 0x19, 0x6d, 0xaf, 0xc8, 0x71, 0x59, 0x11, 0xde, 0x5e, 0xa6, 0xc7, 0x9d, 0x2c, + 0x9f, 0x5d, 0x26, 0xdd, 0xd7, 0x55, 0x58, 0xb7, 0x0b, 0x74, 0x03, 0x5a, 0xc5, 0x91, 0x4c, 0xad, + 0x6b, 0x78, 0x1e, 0x40, 0x7d, 0x68, 0x47, 0x4c, 0xf8, 0x21, 0xd1, 0xc4, 0x57, 0x44, 0x53, 0x73, + 0xc5, 0x6d, 0xec, 0x44, 0x4c, 0x7c, 0x43, 0x34, 0xc1, 0x44, 0x53, 0xc3, 0x90, 0x93, 0x12, 0x53, + 0xb7, 0x0c, 0x39, 0x29, 0x98, 0x47, 0x00, 0x91, 0x0c, 0x53, 0x9e, 0x5d, 0xd5, 0x9a, 0x69, 0xc9, + 0xd6, 0x8a, 0xe3, 0x7c, 0x5f, 0xc0, 0xb8, 0x24, 0xec, 0xff, 0xde, 0x82, 0x75, 0x7b, 0x52, 0x34, + 0x80, 0xcd, 0xb1, 0x54, 0x53, 0xa2, 0x42, 0xaa, 0x7c, 0x41, 0xb5, 0xcf, 0x42, 0x53, 0x7f, 0x1b, + 0x77, 0x8a, 0xf8, 0x53, 0xaa, 0x0f, 0x42, 0x74, 0x1b, 0x36, 0xe6, 0x24, 0x0b, 0xcd, 0x19, 0x5a, + 0xd8, 0x29, 0x62, 0x07, 0x21, 0xda, 0x84, 0x3a, 0x4d, 0x99, 0xa9, 0xbc, 0x81, 0x67, 0x3f, 0xd1, + 0x43, 0x80, 0x34, 0x0e, 0x89, 0xa6, 0xa1, 0x4f, 0xb4, 0xa9, 0xd8, 0x19, 0x75, 0xbd, 0xec, 0x61, + 0x7a, 0xf9, 0xc3, 0xf4, 0x8a, 0xb1, 0xc4, 0x2d, 0x4b, 0xef, 0x68, 0x84, 0xc1, 0xd1, 0x54, 0x29, + 0x9a, 0x68, 0xc5, 0x08, 0x37, 0x83, 0xe9, 0x8c, 0xbc, 0x77, 0x5f, 0x9e, 0xf7, 0x7c, 0xae, 0xda, + 0xaf, 0xe0, 0x72, 0x12, 0xf4, 0x04, 0x5a, 0x09, 0xd1, 0x94, 0x73, 0xa6, 0xa9, 0x19, 0x63, 0x67, + 0xf4, 0xd9, 0x15, 0x32, 0xfe, 0x98, 0x6b, 0xf6, 0x2b, 0x78, 0x9e, 0x60, 0xd6, 0x91, 0xfc, 0x09, + 0x09, 0x12, 0x51, 0x33, 0xfd, 0x2d, 0xec, 0xd8, 0xd8, 0x53, 0x12, 0xd1, 0xd9, 0x9b, 0xcd, 0x11, + 0x1a, 0x11, 0xc6, 0xcd, 0xfc, 0xb7, 0x70, 0xae, 0x7b, 0x34, 0x8b, 0xa1, 0x9b, 0x90, 0x6b, 0xfc, + 0x54, 0x71, 0xb7, 0x65, 0x10, 0xb0, 0xa1, 0x17, 0x8a, 0xa3, 0x11, 0x34, 0xa4, 0xe0, 0x4c, 0x50, + 0x17, 0x96, 0x74, 0x70, 0x57, 0x4a, 0x7e, 0x48, 0x78, 0x4a, 0xb1, 0x25, 0xd1, 0x36, 0x34, 0xd5, + 0x89, 0x35, 0x0a, 0xc7, 0xa8, 0x6e, 0xbc, 0xa5, 0x7a, 0x71, 0x20, 0xf4, 0x83, 0x2f, 0x32, 0xdd, + 0xba, 0x3a, 0xc9, 0x1c, 0x64, 0x1b, 0x9a, 0x3a, 0x17, 0x6e, 0x5c, 0x45, 0xa8, 0xad, 0xf0, 0xf0, + 0xad, 0xc7, 0xde, 0x36, 0xf2, 0xe1, 0xff, 0x7c, 0x70, 0x0b, 0xee, 0xd0, 0xfd, 0xb3, 0x06, 0x4e, + 0xe9, 0x4e, 0xd1, 0xd7, 0x0b, 0x86, 0xea, 0x8c, 0xee, 0xac, 0xf8, 0xc2, 0x13, 0x8b, 0x96, 0x5c, + 0x37, 0x58, 0xe6, 0xba, 0x9d, 0xd1, 0x83, 0x15, 0x99, 0x4a, 0x35, 0xec, 0x2c, 0x78, 0xf3, 0x25, + 0x6e, 0xbd, 0x73, 0x99, 0x5b, 0x2f, 0xeb, 0xe5, 0xfd, 0x51, 0xd6, 0xcb, 0x8b, 0x5e, 0xbe, 0x77, + 0xb9, 0x97, 0xaf, 0xbe, 0xff, 0x05, 0x9f, 0xef, 0xfe, 0x51, 0x85, 0x56, 0x31, 0xbf, 0xef, 0xdf, + 0xbb, 0x3e, 0xb4, 0xc7, 0x8c, 0xf2, 0xd0, 0x97, 0x63, 0xff, 0x15, 0xa3, 0x53, 0xd3, 0xb7, 0x2a, + 0x76, 0x4c, 0xf0, 0x87, 0xf1, 0x21, 0xa3, 0x53, 0xb4, 0x0f, 0xa0, 0x15, 0xf9, 0x85, 0x06, 0x5a, + 0xaa, 0x53, 0xb7, 0x6e, 0x5c, 0x77, 0xb0, 0xaa, 0xb1, 0x2c, 0xa2, 0x61, 0xf1, 0xad, 0x92, 0x76, + 0x17, 0xe6, 0xe5, 0xf6, 0xbf, 0x83, 0xa6, 0x9d, 0x96, 0x04, 0x7d, 0x05, 0xcd, 0x89, 0xfd, 0xed, + 0x56, 0x4d, 0xfe, 0xfe, 0xbb, 0x87, 0x0c, 0x17, 0x9a, 0xdd, 0xc7, 0x7f, 0x9d, 0xf5, 0xaa, 0x6f, + 0xce, 0x7a, 0xd5, 0x7f, 0xce, 0x7a, 0xd5, 0xdf, 0xce, 0x7b, 0x95, 0x37, 0xe7, 0xbd, 0xca, 0xdf, + 0xe7, 0xbd, 0xca, 0x4f, 0x9f, 0x4f, 0xe4, 0xc5, 0x2c, 0x52, 0x4d, 0x2e, 0xfc, 0xe9, 0x7f, 0x59, + 0xde, 0x3d, 0x6a, 0x98, 0x1b, 0xb8, 0xff, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe6, 0x6a, 0x36, + 0x7b, 0xd1, 0x08, 0x00, 0x00, +} + +func (m *GatewayVisibility) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GatewayVisibility) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GatewayVisibility) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.FrequencyPlan { + i-- + if m.FrequencyPlan { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if m.Counters { + i-- + if m.Counters { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if m.Status { + i-- + if m.Status { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.ContactInformation { + i-- + if m.ContactInformation { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.FineTimestamps { + i-- + if m.FineTimestamps { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.AntennaCount { + i-- + if m.AntennaCount { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.AntennaPlacement { + i-- + if m.AntennaPlacement { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if m.Location { + i-- + if m.Location { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GatewayFrequencyPlan) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GatewayFrequencyPlan) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GatewayFrequencyPlan) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.UplinkChannels) > 0 { + for iNdEx := len(m.UplinkChannels) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.UplinkChannels[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMapping(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Region != 0 { + i = encodeVarintMapping(dAtA, i, uint64(m.Region)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GatewayFrequencyPlan_Channel) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GatewayFrequencyPlan_Channel) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GatewayFrequencyPlan_Channel) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Modulation != 0 { + i = encodeVarintMapping(dAtA, i, uint64(m.Modulation)) + i-- + dAtA[i] = 0x20 + } + if m.MaxDataRate != 0 { + i = encodeVarintMapping(dAtA, i, uint64(m.MaxDataRate)) + i-- + dAtA[i] = 0x18 + } + if m.MinDataRate != 0 { + i = encodeVarintMapping(dAtA, i, uint64(m.MinDataRate)) + i-- + dAtA[i] = 0x10 + } + if m.Frequency != 0 { + i = encodeVarintMapping(dAtA, i, uint64(m.Frequency)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Gateway) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Gateway) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Gateway) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.FrequencyPlan != nil { + { + size, err := m.FrequencyPlan.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMapping(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + } + if m.TxCount != nil { + { + size, err := m.TxCount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMapping(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + if m.RxCount != nil { + { + size, err := m.RxCount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMapping(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + if m.Online != nil { + { + size, err := m.Online.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMapping(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + if len(m.ContactUrl) > 0 { + i -= len(m.ContactUrl) + copy(dAtA[i:], m.ContactUrl) + i = encodeVarintMapping(dAtA, i, uint64(len(m.ContactUrl))) + i-- + dAtA[i] = 0x4a + } + if len(m.ContactEmail) > 0 { + i -= len(m.ContactEmail) + copy(dAtA[i:], m.ContactEmail) + i = encodeVarintMapping(dAtA, i, uint64(len(m.ContactEmail))) + i-- + dAtA[i] = 0x42 + } + if len(m.ContactName) > 0 { + i -= len(m.ContactName) + copy(dAtA[i:], m.ContactName) + i = encodeVarintMapping(dAtA, i, uint64(len(m.ContactName))) + i-- + dAtA[i] = 0x3a + } + if m.Location != nil { + { + size := m.Location.Size() + i -= size + if _, err := m.Location.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if m.UpdatedAt != nil { + { + size, err := m.UpdatedAt.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMapping(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.Eui != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Eui)) + i-- + dAtA[i] = 0x19 + } + if len(m.ForwarderId) > 0 { + i -= len(m.ForwarderId) + copy(dAtA[i:], m.ForwarderId) + i = encodeVarintMapping(dAtA, i, uint64(len(m.ForwarderId))) + i-- + dAtA[i] = 0x12 + } + if m.ForwarderNetId != 0 { + i = encodeVarintMapping(dAtA, i, uint64(m.ForwarderNetId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Gateway_Terrestrial_) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Gateway_Terrestrial_) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Terrestrial != nil { + { + size, err := m.Terrestrial.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMapping(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + return len(dAtA) - i, nil +} +func (m *Gateway_Satellite_) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Gateway_Satellite_) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Satellite != nil { + { + size, err := m.Satellite.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMapping(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + return len(dAtA) - i, nil +} +func (m *Gateway_Terrestrial) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Gateway_Terrestrial) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Gateway_Terrestrial) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.FineTimestamps != nil { + { + size, err := m.FineTimestamps.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMapping(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.AntennaCount != nil { + { + size, err := m.AntennaCount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMapping(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.AntennaPlacement != 0 { + i = encodeVarintMapping(dAtA, i, uint64(m.AntennaPlacement)) + i-- + dAtA[i] = 0x10 + } + if m.Location != nil { + { + size, err := m.Location.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMapping(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Gateway_Satellite) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Gateway_Satellite) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Gateway_Satellite) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Trajectory) > 0 { + for iNdEx := len(m.Trajectory) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Trajectory[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMapping(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.FieldOfView != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.FieldOfView)))) + i-- + dAtA[i] = 0x11 + } + if m.Location != nil { + { + size, err := m.Location.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMapping(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Gateways) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Gateways) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Gateways) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Gateways) > 0 { + for iNdEx := len(m.Gateways) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Gateways[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMapping(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintMapping(dAtA []byte, offset int, v uint64) int { + offset -= sovMapping(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GatewayVisibility) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Location { + n += 2 + } + if m.AntennaPlacement { + n += 2 + } + if m.AntennaCount { + n += 2 + } + if m.FineTimestamps { + n += 2 + } + if m.ContactInformation { + n += 2 + } + if m.Status { + n += 2 + } + if m.Counters { + n += 2 + } + if m.FrequencyPlan { + n += 2 + } + return n +} + +func (m *GatewayFrequencyPlan) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Region != 0 { + n += 1 + sovMapping(uint64(m.Region)) + } + if len(m.UplinkChannels) > 0 { + for _, e := range m.UplinkChannels { + l = e.Size() + n += 1 + l + sovMapping(uint64(l)) + } + } + return n +} + +func (m *GatewayFrequencyPlan_Channel) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Frequency != 0 { + n += 1 + sovMapping(uint64(m.Frequency)) + } + if m.MinDataRate != 0 { + n += 1 + sovMapping(uint64(m.MinDataRate)) + } + if m.MaxDataRate != 0 { + n += 1 + sovMapping(uint64(m.MaxDataRate)) + } + if m.Modulation != 0 { + n += 1 + sovMapping(uint64(m.Modulation)) + } + return n +} + +func (m *Gateway) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ForwarderNetId != 0 { + n += 1 + sovMapping(uint64(m.ForwarderNetId)) + } + l = len(m.ForwarderId) + if l > 0 { + n += 1 + l + sovMapping(uint64(l)) + } + if m.Eui != 0 { + n += 9 + } + if m.UpdatedAt != nil { + l = m.UpdatedAt.Size() + n += 1 + l + sovMapping(uint64(l)) + } + if m.Location != nil { + n += m.Location.Size() + } + l = len(m.ContactName) + if l > 0 { + n += 1 + l + sovMapping(uint64(l)) + } + l = len(m.ContactEmail) + if l > 0 { + n += 1 + l + sovMapping(uint64(l)) + } + l = len(m.ContactUrl) + if l > 0 { + n += 1 + l + sovMapping(uint64(l)) + } + if m.Online != nil { + l = m.Online.Size() + n += 1 + l + sovMapping(uint64(l)) + } + if m.RxCount != nil { + l = m.RxCount.Size() + n += 1 + l + sovMapping(uint64(l)) + } + if m.TxCount != nil { + l = m.TxCount.Size() + n += 1 + l + sovMapping(uint64(l)) + } + if m.FrequencyPlan != nil { + l = m.FrequencyPlan.Size() + n += 1 + l + sovMapping(uint64(l)) + } + return n +} + +func (m *Gateway_Terrestrial_) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Terrestrial != nil { + l = m.Terrestrial.Size() + n += 1 + l + sovMapping(uint64(l)) + } + return n +} +func (m *Gateway_Satellite_) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Satellite != nil { + l = m.Satellite.Size() + n += 1 + l + sovMapping(uint64(l)) + } + return n +} +func (m *Gateway_Terrestrial) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Location != nil { + l = m.Location.Size() + n += 1 + l + sovMapping(uint64(l)) + } + if m.AntennaPlacement != 0 { + n += 1 + sovMapping(uint64(m.AntennaPlacement)) + } + if m.AntennaCount != nil { + l = m.AntennaCount.Size() + n += 1 + l + sovMapping(uint64(l)) + } + if m.FineTimestamps != nil { + l = m.FineTimestamps.Size() + n += 1 + l + sovMapping(uint64(l)) + } + return n +} + +func (m *Gateway_Satellite) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Location != nil { + l = m.Location.Size() + n += 1 + l + sovMapping(uint64(l)) + } + if m.FieldOfView != 0 { + n += 9 + } + if len(m.Trajectory) > 0 { + for _, e := range m.Trajectory { + l = e.Size() + n += 1 + l + sovMapping(uint64(l)) + } + } + return n +} + +func (m *Gateways) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Gateways) > 0 { + for _, e := range m.Gateways { + l = e.Size() + n += 1 + l + sovMapping(uint64(l)) + } + } + return n +} + +func sovMapping(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMapping(x uint64) (n int) { + return sovMapping(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GatewayVisibility) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GatewayVisibility: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GatewayVisibility: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Location = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AntennaPlacement", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AntennaPlacement = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AntennaCount", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AntennaCount = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FineTimestamps", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.FineTimestamps = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ContactInformation", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ContactInformation = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Status = bool(v != 0) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Counters", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Counters = bool(v != 0) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FrequencyPlan", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.FrequencyPlan = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipMapping(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapping + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMapping + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GatewayFrequencyPlan) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GatewayFrequencyPlan: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GatewayFrequencyPlan: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Region", wireType) + } + m.Region = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Region |= Region(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UplinkChannels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapping + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMapping + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UplinkChannels = append(m.UplinkChannels, &GatewayFrequencyPlan_Channel{}) + if err := m.UplinkChannels[len(m.UplinkChannels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapping(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapping + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMapping + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GatewayFrequencyPlan_Channel) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Channel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Channel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Frequency", wireType) + } + m.Frequency = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Frequency |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinDataRate", wireType) + } + m.MinDataRate = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MinDataRate |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxDataRate", wireType) + } + m.MaxDataRate = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxDataRate |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Modulation", wireType) + } + m.Modulation = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Modulation |= Modulation(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMapping(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapping + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMapping + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Gateway) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Gateway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Gateway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderNetId", wireType) + } + m.ForwarderNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ForwarderNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMapping + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMapping + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForwarderId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Eui", wireType) + } + m.Eui = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Eui = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapping + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMapping + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.UpdatedAt == nil { + m.UpdatedAt = &types.Timestamp{} + } + if err := m.UpdatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Terrestrial", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapping + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMapping + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Gateway_Terrestrial{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Location = &Gateway_Terrestrial_{v} + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Satellite", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapping + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMapping + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Gateway_Satellite{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Location = &Gateway_Satellite_{v} + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContactName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMapping + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMapping + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContactName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContactEmail", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMapping + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMapping + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContactEmail = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContactUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMapping + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMapping + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContactUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Online", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapping + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMapping + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Online == nil { + m.Online = &types.BoolValue{} + } + if err := m.Online.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RxCount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapping + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMapping + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RxCount == nil { + m.RxCount = &types.UInt64Value{} + } + if err := m.RxCount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxCount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapping + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMapping + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TxCount == nil { + m.TxCount = &types.UInt64Value{} + } + if err := m.TxCount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FrequencyPlan", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapping + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMapping + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FrequencyPlan == nil { + m.FrequencyPlan = &GatewayFrequencyPlan{} + } + if err := m.FrequencyPlan.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapping(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapping + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMapping + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Gateway_Terrestrial) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Terrestrial: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Terrestrial: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapping + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMapping + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Location == nil { + m.Location = &Location{} + } + if err := m.Location.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AntennaPlacement", wireType) + } + m.AntennaPlacement = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AntennaPlacement |= TerrestrialAntennaPlacement(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AntennaCount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapping + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMapping + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AntennaCount == nil { + m.AntennaCount = &types.UInt32Value{} + } + if err := m.AntennaCount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FineTimestamps", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapping + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMapping + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FineTimestamps == nil { + m.FineTimestamps = &types.BoolValue{} + } + if err := m.FineTimestamps.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapping(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapping + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMapping + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Gateway_Satellite) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Satellite: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Satellite: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapping + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMapping + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Location == nil { + m.Location = &Location{} + } + if err := m.Location.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldOfView", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldOfView = float64(math.Float64frombits(v)) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Trajectory", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapping + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMapping + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Trajectory = append(m.Trajectory, &TimedLocation{}) + if err := m.Trajectory[len(m.Trajectory)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapping(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapping + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMapping + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Gateways) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Gateways: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Gateways: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Gateways", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapping + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapping + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMapping + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Gateways = append(m.Gateways, &Gateway{}) + if err := m.Gateways[len(m.Gateways)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapping(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapping + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMapping + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMapping(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMapping + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMapping + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMapping + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthMapping + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMapping + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMapping + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMapping = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMapping = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMapping = fmt.Errorf("proto: unexpected end of group") +) diff --git a/v1alpha1/mapping_services.pb.go b/v1alpha1/mapping_services.pb.go new file mode 100644 index 0000000..e3a13c8 --- /dev/null +++ b/v1alpha1/mapping_services.pb.go @@ -0,0 +1,3239 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: packetbroker/api/v1alpha1/mapping_services.proto + +package packetbroker + +import ( + context "context" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + types "github.com/gogo/protobuf/types" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type GetDefaultGatewayVisibilityRequest struct { + // LoRa Alliance NetID of the Forwarder Member. + ForwarderNetId uint32 `protobuf:"varint,1,opt,name=forwarder_net_id,json=forwarderNetId,proto3" json:"forwarder_net_id,omitempty"` + // Forwarder identifier issued by the Forwarder Member. + ForwarderId string `protobuf:"bytes,2,opt,name=forwarder_id,json=forwarderId,proto3" json:"forwarder_id,omitempty"` +} + +func (m *GetDefaultGatewayVisibilityRequest) Reset() { *m = GetDefaultGatewayVisibilityRequest{} } +func (m *GetDefaultGatewayVisibilityRequest) String() string { return proto.CompactTextString(m) } +func (*GetDefaultGatewayVisibilityRequest) ProtoMessage() {} +func (*GetDefaultGatewayVisibilityRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4ee43d4037b5b05a, []int{0} +} +func (m *GetDefaultGatewayVisibilityRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetDefaultGatewayVisibilityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetDefaultGatewayVisibilityRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetDefaultGatewayVisibilityRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetDefaultGatewayVisibilityRequest.Merge(m, src) +} +func (m *GetDefaultGatewayVisibilityRequest) XXX_Size() int { + return m.Size() +} +func (m *GetDefaultGatewayVisibilityRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetDefaultGatewayVisibilityRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetDefaultGatewayVisibilityRequest proto.InternalMessageInfo + +func (m *GetDefaultGatewayVisibilityRequest) GetForwarderNetId() uint32 { + if m != nil { + return m.ForwarderNetId + } + return 0 +} + +func (m *GetDefaultGatewayVisibilityRequest) GetForwarderId() string { + if m != nil { + return m.ForwarderId + } + return "" +} + +type SetDefaultGatewayVisibilityRequest struct { + // LoRa Alliance NetID of the Forwarder Member. + ForwarderNetId uint32 `protobuf:"varint,1,opt,name=forwarder_net_id,json=forwarderNetId,proto3" json:"forwarder_net_id,omitempty"` + // Forwarder identifier issued by the Forwarder Member. + ForwarderId string `protobuf:"bytes,2,opt,name=forwarder_id,json=forwarderId,proto3" json:"forwarder_id,omitempty"` + // New default Gateway Visibility. + Visibility *GatewayVisibility `protobuf:"bytes,3,opt,name=visibility,proto3" json:"visibility,omitempty"` +} + +func (m *SetDefaultGatewayVisibilityRequest) Reset() { *m = SetDefaultGatewayVisibilityRequest{} } +func (m *SetDefaultGatewayVisibilityRequest) String() string { return proto.CompactTextString(m) } +func (*SetDefaultGatewayVisibilityRequest) ProtoMessage() {} +func (*SetDefaultGatewayVisibilityRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4ee43d4037b5b05a, []int{1} +} +func (m *SetDefaultGatewayVisibilityRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SetDefaultGatewayVisibilityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SetDefaultGatewayVisibilityRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SetDefaultGatewayVisibilityRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetDefaultGatewayVisibilityRequest.Merge(m, src) +} +func (m *SetDefaultGatewayVisibilityRequest) XXX_Size() int { + return m.Size() +} +func (m *SetDefaultGatewayVisibilityRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SetDefaultGatewayVisibilityRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SetDefaultGatewayVisibilityRequest proto.InternalMessageInfo + +func (m *SetDefaultGatewayVisibilityRequest) GetForwarderNetId() uint32 { + if m != nil { + return m.ForwarderNetId + } + return 0 +} + +func (m *SetDefaultGatewayVisibilityRequest) GetForwarderId() string { + if m != nil { + return m.ForwarderId + } + return "" +} + +func (m *SetDefaultGatewayVisibilityRequest) GetVisibility() *GatewayVisibility { + if m != nil { + return m.Visibility + } + return nil +} + +type GetHomeNetworkGatewayVisibilityRequest struct { + // LoRa Alliance NetID of the Forwarder Member. + ForwarderNetId uint32 `protobuf:"varint,1,opt,name=forwarder_net_id,json=forwarderNetId,proto3" json:"forwarder_net_id,omitempty"` + // Forwarder identifier issued by the Forwarder Member. + ForwarderId string `protobuf:"bytes,2,opt,name=forwarder_id,json=forwarderId,proto3" json:"forwarder_id,omitempty"` + // LoRa Alliance NetID of the Home Network Member. + HomeNetworkNetId uint32 `protobuf:"varint,3,opt,name=home_network_net_id,json=homeNetworkNetId,proto3" json:"home_network_net_id,omitempty"` +} + +func (m *GetHomeNetworkGatewayVisibilityRequest) Reset() { + *m = GetHomeNetworkGatewayVisibilityRequest{} +} +func (m *GetHomeNetworkGatewayVisibilityRequest) String() string { return proto.CompactTextString(m) } +func (*GetHomeNetworkGatewayVisibilityRequest) ProtoMessage() {} +func (*GetHomeNetworkGatewayVisibilityRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4ee43d4037b5b05a, []int{2} +} +func (m *GetHomeNetworkGatewayVisibilityRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetHomeNetworkGatewayVisibilityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetHomeNetworkGatewayVisibilityRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetHomeNetworkGatewayVisibilityRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetHomeNetworkGatewayVisibilityRequest.Merge(m, src) +} +func (m *GetHomeNetworkGatewayVisibilityRequest) XXX_Size() int { + return m.Size() +} +func (m *GetHomeNetworkGatewayVisibilityRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetHomeNetworkGatewayVisibilityRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetHomeNetworkGatewayVisibilityRequest proto.InternalMessageInfo + +func (m *GetHomeNetworkGatewayVisibilityRequest) GetForwarderNetId() uint32 { + if m != nil { + return m.ForwarderNetId + } + return 0 +} + +func (m *GetHomeNetworkGatewayVisibilityRequest) GetForwarderId() string { + if m != nil { + return m.ForwarderId + } + return "" +} + +func (m *GetHomeNetworkGatewayVisibilityRequest) GetHomeNetworkNetId() uint32 { + if m != nil { + return m.HomeNetworkNetId + } + return 0 +} + +type SetHomeNetworkGatewayVisibilityRequest struct { + // LoRa Alliance NetID of the Forwarder Member. + ForwarderNetId uint32 `protobuf:"varint,1,opt,name=forwarder_net_id,json=forwarderNetId,proto3" json:"forwarder_net_id,omitempty"` + // Forwarder identifier issued by the Forwarder Member. + ForwarderId string `protobuf:"bytes,2,opt,name=forwarder_id,json=forwarderId,proto3" json:"forwarder_id,omitempty"` + // LoRa Alliance NetID of the Home Network Member. + HomeNetworkNetId uint32 `protobuf:"varint,3,opt,name=home_network_net_id,json=homeNetworkNetId,proto3" json:"home_network_net_id,omitempty"` + // New Gateway Visibility for the Home Network Member. + Visibility *GatewayVisibility `protobuf:"bytes,4,opt,name=visibility,proto3" json:"visibility,omitempty"` +} + +func (m *SetHomeNetworkGatewayVisibilityRequest) Reset() { + *m = SetHomeNetworkGatewayVisibilityRequest{} +} +func (m *SetHomeNetworkGatewayVisibilityRequest) String() string { return proto.CompactTextString(m) } +func (*SetHomeNetworkGatewayVisibilityRequest) ProtoMessage() {} +func (*SetHomeNetworkGatewayVisibilityRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4ee43d4037b5b05a, []int{3} +} +func (m *SetHomeNetworkGatewayVisibilityRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SetHomeNetworkGatewayVisibilityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SetHomeNetworkGatewayVisibilityRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SetHomeNetworkGatewayVisibilityRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetHomeNetworkGatewayVisibilityRequest.Merge(m, src) +} +func (m *SetHomeNetworkGatewayVisibilityRequest) XXX_Size() int { + return m.Size() +} +func (m *SetHomeNetworkGatewayVisibilityRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SetHomeNetworkGatewayVisibilityRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SetHomeNetworkGatewayVisibilityRequest proto.InternalMessageInfo + +func (m *SetHomeNetworkGatewayVisibilityRequest) GetForwarderNetId() uint32 { + if m != nil { + return m.ForwarderNetId + } + return 0 +} + +func (m *SetHomeNetworkGatewayVisibilityRequest) GetForwarderId() string { + if m != nil { + return m.ForwarderId + } + return "" +} + +func (m *SetHomeNetworkGatewayVisibilityRequest) GetHomeNetworkNetId() uint32 { + if m != nil { + return m.HomeNetworkNetId + } + return 0 +} + +func (m *SetHomeNetworkGatewayVisibilityRequest) GetVisibility() *GatewayVisibility { + if m != nil { + return m.Visibility + } + return nil +} + +type GetGatewayVisibilityResponse struct { + Visibility *GatewayVisibility `protobuf:"bytes,1,opt,name=visibility,proto3" json:"visibility,omitempty"` +} + +func (m *GetGatewayVisibilityResponse) Reset() { *m = GetGatewayVisibilityResponse{} } +func (m *GetGatewayVisibilityResponse) String() string { return proto.CompactTextString(m) } +func (*GetGatewayVisibilityResponse) ProtoMessage() {} +func (*GetGatewayVisibilityResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4ee43d4037b5b05a, []int{4} +} +func (m *GetGatewayVisibilityResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetGatewayVisibilityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetGatewayVisibilityResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetGatewayVisibilityResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetGatewayVisibilityResponse.Merge(m, src) +} +func (m *GetGatewayVisibilityResponse) XXX_Size() int { + return m.Size() +} +func (m *GetGatewayVisibilityResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetGatewayVisibilityResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetGatewayVisibilityResponse proto.InternalMessageInfo + +func (m *GetGatewayVisibilityResponse) GetVisibility() *GatewayVisibility { + if m != nil { + return m.Visibility + } + return nil +} + +type UpdateForwarderGatewayRequest struct { + // LoRa Alliance NetID of the Forwarder Member. + ForwarderNetId uint32 `protobuf:"varint,1,opt,name=forwarder_net_id,json=forwarderNetId,proto3" json:"forwarder_net_id,omitempty"` + // Forwarder identifier issued by the Forwarder Member. + ForwarderId string `protobuf:"bytes,2,opt,name=forwarder_id,json=forwarderId,proto3" json:"forwarder_id,omitempty"` + // Gateway to update. + Gateway *Gateway `protobuf:"bytes,3,opt,name=gateway,proto3" json:"gateway,omitempty"` +} + +func (m *UpdateForwarderGatewayRequest) Reset() { *m = UpdateForwarderGatewayRequest{} } +func (m *UpdateForwarderGatewayRequest) String() string { return proto.CompactTextString(m) } +func (*UpdateForwarderGatewayRequest) ProtoMessage() {} +func (*UpdateForwarderGatewayRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4ee43d4037b5b05a, []int{5} +} +func (m *UpdateForwarderGatewayRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UpdateForwarderGatewayRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UpdateForwarderGatewayRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *UpdateForwarderGatewayRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateForwarderGatewayRequest.Merge(m, src) +} +func (m *UpdateForwarderGatewayRequest) XXX_Size() int { + return m.Size() +} +func (m *UpdateForwarderGatewayRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateForwarderGatewayRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateForwarderGatewayRequest proto.InternalMessageInfo + +func (m *UpdateForwarderGatewayRequest) GetForwarderNetId() uint32 { + if m != nil { + return m.ForwarderNetId + } + return 0 +} + +func (m *UpdateForwarderGatewayRequest) GetForwarderId() string { + if m != nil { + return m.ForwarderId + } + return "" +} + +func (m *UpdateForwarderGatewayRequest) GetGateway() *Gateway { + if m != nil { + return m.Gateway + } + return nil +} + +type ListHomeNetworkGatewaysRequest struct { + // LoRa Alliance NetID of the Home Network Member. + HomeNetworkNetId uint32 `protobuf:"varint,1,opt,name=home_network_net_id,json=homeNetworkNetId,proto3" json:"home_network_net_id,omitempty"` + // Limit the number of results per page. Use 0 for the default limit of the Mapper. + Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + // Page number for pagination. 0 is interpreted as 1. + Page uint32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"` +} + +func (m *ListHomeNetworkGatewaysRequest) Reset() { *m = ListHomeNetworkGatewaysRequest{} } +func (m *ListHomeNetworkGatewaysRequest) String() string { return proto.CompactTextString(m) } +func (*ListHomeNetworkGatewaysRequest) ProtoMessage() {} +func (*ListHomeNetworkGatewaysRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4ee43d4037b5b05a, []int{6} +} +func (m *ListHomeNetworkGatewaysRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListHomeNetworkGatewaysRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListHomeNetworkGatewaysRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ListHomeNetworkGatewaysRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListHomeNetworkGatewaysRequest.Merge(m, src) +} +func (m *ListHomeNetworkGatewaysRequest) XXX_Size() int { + return m.Size() +} +func (m *ListHomeNetworkGatewaysRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListHomeNetworkGatewaysRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListHomeNetworkGatewaysRequest proto.InternalMessageInfo + +func (m *ListHomeNetworkGatewaysRequest) GetHomeNetworkNetId() uint32 { + if m != nil { + return m.HomeNetworkNetId + } + return 0 +} + +func (m *ListHomeNetworkGatewaysRequest) GetLimit() uint32 { + if m != nil { + return m.Limit + } + return 0 +} + +func (m *ListHomeNetworkGatewaysRequest) GetPage() uint32 { + if m != nil { + return m.Page + } + return 0 +} + +type GetHomeNetworkGatewayRequest struct { + // LoRa Alliance NetID of the Home Network Member. + HomeNetworkNetId uint32 `protobuf:"varint,1,opt,name=home_network_net_id,json=homeNetworkNetId,proto3" json:"home_network_net_id,omitempty"` + // LoRa Alliance NetID of the Forwarder Member. + ForwarderNetId uint32 `protobuf:"varint,2,opt,name=forwarder_net_id,json=forwarderNetId,proto3" json:"forwarder_net_id,omitempty"` + // Forwarder identifier issued by the Forwarder Member. + ForwarderId string `protobuf:"bytes,3,opt,name=forwarder_id,json=forwarderId,proto3" json:"forwarder_id,omitempty"` + // Unique identifier of the gateway. + Eui uint64 `protobuf:"varint,4,opt,name=eui,proto3" json:"eui,omitempty"` +} + +func (m *GetHomeNetworkGatewayRequest) Reset() { *m = GetHomeNetworkGatewayRequest{} } +func (m *GetHomeNetworkGatewayRequest) String() string { return proto.CompactTextString(m) } +func (*GetHomeNetworkGatewayRequest) ProtoMessage() {} +func (*GetHomeNetworkGatewayRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4ee43d4037b5b05a, []int{7} +} +func (m *GetHomeNetworkGatewayRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetHomeNetworkGatewayRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetHomeNetworkGatewayRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetHomeNetworkGatewayRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetHomeNetworkGatewayRequest.Merge(m, src) +} +func (m *GetHomeNetworkGatewayRequest) XXX_Size() int { + return m.Size() +} +func (m *GetHomeNetworkGatewayRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetHomeNetworkGatewayRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetHomeNetworkGatewayRequest proto.InternalMessageInfo + +func (m *GetHomeNetworkGatewayRequest) GetHomeNetworkNetId() uint32 { + if m != nil { + return m.HomeNetworkNetId + } + return 0 +} + +func (m *GetHomeNetworkGatewayRequest) GetForwarderNetId() uint32 { + if m != nil { + return m.ForwarderNetId + } + return 0 +} + +func (m *GetHomeNetworkGatewayRequest) GetForwarderId() string { + if m != nil { + return m.ForwarderId + } + return "" +} + +func (m *GetHomeNetworkGatewayRequest) GetEui() uint64 { + if m != nil { + return m.Eui + } + return 0 +} + +type SubscribeHomeNetworkGatewaysRequest struct { + // LoRa Alliance NetID of the Home Network Member. + HomeNetworkNetId uint32 `protobuf:"varint,1,opt,name=home_network_net_id,json=homeNetworkNetId,proto3" json:"home_network_net_id,omitempty"` + // Set of gateways to subscribe to. + // Leave empty to subscribe to all gateways. + Gateways []*SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs `protobuf:"bytes,2,rep,name=gateways,proto3" json:"gateways,omitempty"` + // Shared subscription group (optional). + // Queue durability depends on the Mapper configuration. + Group string `protobuf:"bytes,3,opt,name=group,proto3" json:"group,omitempty"` +} + +func (m *SubscribeHomeNetworkGatewaysRequest) Reset() { *m = SubscribeHomeNetworkGatewaysRequest{} } +func (m *SubscribeHomeNetworkGatewaysRequest) String() string { return proto.CompactTextString(m) } +func (*SubscribeHomeNetworkGatewaysRequest) ProtoMessage() {} +func (*SubscribeHomeNetworkGatewaysRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4ee43d4037b5b05a, []int{8} +} +func (m *SubscribeHomeNetworkGatewaysRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SubscribeHomeNetworkGatewaysRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SubscribeHomeNetworkGatewaysRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SubscribeHomeNetworkGatewaysRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubscribeHomeNetworkGatewaysRequest.Merge(m, src) +} +func (m *SubscribeHomeNetworkGatewaysRequest) XXX_Size() int { + return m.Size() +} +func (m *SubscribeHomeNetworkGatewaysRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SubscribeHomeNetworkGatewaysRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SubscribeHomeNetworkGatewaysRequest proto.InternalMessageInfo + +func (m *SubscribeHomeNetworkGatewaysRequest) GetHomeNetworkNetId() uint32 { + if m != nil { + return m.HomeNetworkNetId + } + return 0 +} + +func (m *SubscribeHomeNetworkGatewaysRequest) GetGateways() []*SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs { + if m != nil { + return m.Gateways + } + return nil +} + +func (m *SubscribeHomeNetworkGatewaysRequest) GetGroup() string { + if m != nil { + return m.Group + } + return "" +} + +type SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs struct { + // LoRa Alliance NetID of the Forwarder Member. + ForwarderNetId uint32 `protobuf:"varint,1,opt,name=forwarder_net_id,json=forwarderNetId,proto3" json:"forwarder_net_id,omitempty"` + // Forwarder identifier issued by the Forwarder Member. + ForwarderId string `protobuf:"bytes,2,opt,name=forwarder_id,json=forwarderId,proto3" json:"forwarder_id,omitempty"` + // Set of unique identifiers of gateways. + // Leave empty to subscribe to all gateways of the Forwarder Member. + Euis []uint64 `protobuf:"varint,3,rep,packed,name=euis,proto3" json:"euis,omitempty"` +} + +func (m *SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs) Reset() { + *m = SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs{} +} +func (m *SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs) String() string { + return proto.CompactTextString(m) +} +func (*SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs) ProtoMessage() {} +func (*SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs) Descriptor() ([]byte, []int) { + return fileDescriptor_4ee43d4037b5b05a, []int{8, 0} +} +func (m *SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs.Merge(m, src) +} +func (m *SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs) XXX_Size() int { + return m.Size() +} +func (m *SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs) XXX_DiscardUnknown() { + xxx_messageInfo_SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs.DiscardUnknown(m) +} + +var xxx_messageInfo_SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs proto.InternalMessageInfo + +func (m *SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs) GetForwarderNetId() uint32 { + if m != nil { + return m.ForwarderNetId + } + return 0 +} + +func (m *SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs) GetForwarderId() string { + if m != nil { + return m.ForwarderId + } + return "" +} + +func (m *SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs) GetEuis() []uint64 { + if m != nil { + return m.Euis + } + return nil +} + +func init() { + proto.RegisterType((*GetDefaultGatewayVisibilityRequest)(nil), "org.packetbroker.v1alpha1.GetDefaultGatewayVisibilityRequest") + proto.RegisterType((*SetDefaultGatewayVisibilityRequest)(nil), "org.packetbroker.v1alpha1.SetDefaultGatewayVisibilityRequest") + proto.RegisterType((*GetHomeNetworkGatewayVisibilityRequest)(nil), "org.packetbroker.v1alpha1.GetHomeNetworkGatewayVisibilityRequest") + proto.RegisterType((*SetHomeNetworkGatewayVisibilityRequest)(nil), "org.packetbroker.v1alpha1.SetHomeNetworkGatewayVisibilityRequest") + proto.RegisterType((*GetGatewayVisibilityResponse)(nil), "org.packetbroker.v1alpha1.GetGatewayVisibilityResponse") + proto.RegisterType((*UpdateForwarderGatewayRequest)(nil), "org.packetbroker.v1alpha1.UpdateForwarderGatewayRequest") + proto.RegisterType((*ListHomeNetworkGatewaysRequest)(nil), "org.packetbroker.v1alpha1.ListHomeNetworkGatewaysRequest") + proto.RegisterType((*GetHomeNetworkGatewayRequest)(nil), "org.packetbroker.v1alpha1.GetHomeNetworkGatewayRequest") + proto.RegisterType((*SubscribeHomeNetworkGatewaysRequest)(nil), "org.packetbroker.v1alpha1.SubscribeHomeNetworkGatewaysRequest") + proto.RegisterType((*SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs)(nil), "org.packetbroker.v1alpha1.SubscribeHomeNetworkGatewaysRequest.ForwarderEUIs") +} + +func init() { + proto.RegisterFile("packetbroker/api/v1alpha1/mapping_services.proto", fileDescriptor_4ee43d4037b5b05a) +} + +var fileDescriptor_4ee43d4037b5b05a = []byte{ + // 718 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xbb, 0x6e, 0x13, 0x4d, + 0x14, 0xce, 0x78, 0xfd, 0xdf, 0x4e, 0xe2, 0x1f, 0x33, 0x44, 0x68, 0x31, 0xb0, 0x32, 0x1b, 0x29, + 0xb8, 0x20, 0xeb, 0xc4, 0x14, 0x01, 0x71, 0x91, 0x40, 0x04, 0x13, 0x29, 0x49, 0xb1, 0x56, 0x28, + 0x68, 0xa2, 0x71, 0x3c, 0x59, 0x8f, 0x62, 0x7b, 0x26, 0xb3, 0xb3, 0x09, 0x7e, 0x09, 0x44, 0xc5, + 0x13, 0x50, 0x45, 0xbc, 0x03, 0x1d, 0xa2, 0x4c, 0x49, 0x89, 0x92, 0x86, 0x9a, 0x27, 0x40, 0xde, + 0x9b, 0xed, 0x38, 0x5e, 0x3b, 0x17, 0x22, 0xba, 0xf1, 0xec, 0x9c, 0xf3, 0x7d, 0x73, 0xbe, 0x33, + 0xdf, 0x31, 0xcc, 0x0b, 0xb2, 0xb9, 0x4d, 0x55, 0x55, 0xf2, 0x6d, 0x2a, 0x8b, 0x44, 0xb0, 0xe2, + 0xee, 0x02, 0x69, 0x88, 0x3a, 0x59, 0x28, 0x36, 0x89, 0x10, 0xac, 0xe5, 0x6c, 0xb8, 0x54, 0xee, + 0xb2, 0x4d, 0xea, 0x5a, 0x42, 0x72, 0xc5, 0xf1, 0x0d, 0x2e, 0x1d, 0xab, 0x37, 0xca, 0x8a, 0x22, + 0x72, 0x37, 0x1d, 0xce, 0x9d, 0x06, 0x2d, 0xfa, 0x07, 0xab, 0xde, 0x56, 0x91, 0x36, 0x85, 0x6a, + 0x07, 0x71, 0xb9, 0xbb, 0x23, 0x91, 0x82, 0x83, 0xe6, 0x0e, 0x98, 0x65, 0xaa, 0x5e, 0xd0, 0x2d, + 0xe2, 0x35, 0x54, 0x99, 0x28, 0xba, 0x47, 0xda, 0xaf, 0x99, 0xcb, 0xaa, 0xac, 0xc1, 0x54, 0xdb, + 0xa6, 0x3b, 0x1e, 0x75, 0x15, 0x2e, 0x40, 0x76, 0x8b, 0xcb, 0x3d, 0x22, 0x6b, 0x54, 0x6e, 0xb4, + 0xa8, 0xda, 0x60, 0x35, 0x1d, 0xe5, 0x51, 0x21, 0x63, 0xff, 0x1f, 0xef, 0xaf, 0x51, 0xb5, 0x5c, + 0xc3, 0x77, 0x60, 0xaa, 0x7b, 0x92, 0xd5, 0xf4, 0x54, 0x1e, 0x15, 0xfe, 0xb3, 0x27, 0xe3, 0xbd, + 0xe5, 0x9a, 0xf9, 0x19, 0x81, 0x59, 0xb9, 0x5c, 0x4c, 0xbc, 0x02, 0xb0, 0x1b, 0x23, 0xe8, 0x5a, + 0x1e, 0x15, 0x26, 0x4b, 0xf7, 0xac, 0xa1, 0xc5, 0xb5, 0x06, 0x59, 0xf5, 0xc4, 0x9b, 0x1f, 0x11, + 0xcc, 0x96, 0xa9, 0x7a, 0xc5, 0x9b, 0x74, 0x8d, 0xaa, 0x3d, 0x2e, 0xb7, 0x2f, 0xe7, 0x16, 0x73, + 0x70, 0xad, 0xce, 0x9b, 0xb4, 0x93, 0xa7, 0x03, 0x1a, 0xe5, 0xd3, 0xfc, 0x7c, 0xd9, 0x7a, 0x97, + 0x8e, 0x9f, 0xd1, 0xfc, 0x89, 0x60, 0xb6, 0xf2, 0xc7, 0xd3, 0x3c, 0xa6, 0x4d, 0xfa, 0x9c, 0xda, + 0x34, 0xe0, 0x56, 0x99, 0x9e, 0xd4, 0x55, 0xae, 0xe0, 0x2d, 0x97, 0x1e, 0x43, 0x43, 0xe7, 0x44, + 0xdb, 0x47, 0x70, 0x7b, 0x5d, 0xd4, 0x88, 0xa2, 0x2f, 0xa3, 0x02, 0x84, 0x01, 0xbf, 0xa5, 0xb2, + 0x8f, 0xe1, 0x1f, 0x27, 0x48, 0x1f, 0xf6, 0xb0, 0x39, 0x9a, 0xb9, 0x1d, 0x85, 0x98, 0x6d, 0x30, + 0x56, 0x98, 0x7b, 0x42, 0x3f, 0xb8, 0x11, 0xd9, 0x21, 0xca, 0xa1, 0x21, 0xca, 0x4d, 0xc3, 0x5f, + 0x0d, 0xd6, 0x64, 0xca, 0xa7, 0x9a, 0xb1, 0x83, 0x1f, 0x18, 0x43, 0x5a, 0x10, 0x87, 0x86, 0x7a, + 0xfb, 0x6b, 0xf3, 0x13, 0xf2, 0x65, 0x19, 0x84, 0x3e, 0x23, 0xf2, 0x49, 0x55, 0x4d, 0x8d, 0x55, + 0x55, 0x6d, 0xb0, 0xaa, 0x59, 0xd0, 0xa8, 0xc7, 0xfc, 0xce, 0x4b, 0xdb, 0x9d, 0xa5, 0xf9, 0x25, + 0x05, 0x33, 0x15, 0xaf, 0xea, 0x6e, 0x4a, 0x56, 0xa5, 0x17, 0x57, 0xaf, 0x3a, 0xfc, 0x1b, 0x6a, + 0xe1, 0xea, 0xa9, 0xbc, 0x56, 0x98, 0x2c, 0xad, 0x24, 0xe8, 0x37, 0x06, 0x01, 0x2b, 0xee, 0xba, + 0xa5, 0xf5, 0x65, 0xd7, 0x8e, 0xb3, 0x77, 0x94, 0x71, 0x24, 0xf7, 0x44, 0x78, 0xdd, 0xe0, 0x47, + 0x4e, 0x40, 0xa6, 0x2f, 0xe0, 0x62, 0x9b, 0x13, 0x43, 0x9a, 0x7a, 0xcc, 0xd5, 0xb5, 0xbc, 0x56, + 0x48, 0xdb, 0xfe, 0xba, 0xb4, 0x9f, 0x06, 0x7d, 0xe0, 0x05, 0xad, 0x92, 0x16, 0x71, 0xa8, 0xc4, + 0xef, 0x10, 0x4c, 0x77, 0x87, 0x4f, 0xf7, 0x3b, 0x7e, 0x92, 0xd4, 0xd5, 0x23, 0x27, 0x47, 0x6e, + 0x31, 0x39, 0x7c, 0xb8, 0x37, 0x34, 0x61, 0xba, 0x72, 0x5a, 0x3e, 0xa3, 0x27, 0x59, 0xee, 0xba, + 0x15, 0x8c, 0x6a, 0x2b, 0x1a, 0xd5, 0xd6, 0x52, 0x67, 0x54, 0xe3, 0x0f, 0x08, 0xf4, 0xfe, 0x47, + 0xd1, 0x83, 0xf9, 0x2c, 0xf9, 0x12, 0x63, 0x98, 0xfa, 0xd9, 0xeb, 0xe0, 0x81, 0x5e, 0x39, 0x0b, + 0xaf, 0xf1, 0x86, 0xcd, 0xb0, 0x7a, 0x94, 0x14, 0x5c, 0x89, 0xdb, 0x73, 0x95, 0x08, 0x41, 0x25, + 0x26, 0x90, 0x09, 0xec, 0x35, 0x4c, 0x86, 0x1f, 0x24, 0xc0, 0x27, 0x1a, 0xf1, 0x50, 0xd4, 0x1f, + 0x29, 0xb8, 0xda, 0xc3, 0x3a, 0x04, 0x6e, 0xc1, 0x54, 0xc7, 0x2b, 0xa3, 0xf7, 0x86, 0x1f, 0x26, + 0xe0, 0x26, 0x9b, 0x6a, 0x6e, 0x66, 0xb4, 0x47, 0xbb, 0x98, 0x01, 0x74, 0x25, 0xc1, 0x8b, 0xa7, + 0x15, 0x3f, 0xc2, 0x1a, 0x63, 0x1e, 0xe0, 0xb7, 0x90, 0x8d, 0xad, 0x25, 0xda, 0x7b, 0x7a, 0x3e, + 0x1f, 0x1a, 0x07, 0x77, 0x1e, 0x3d, 0x2f, 0x7f, 0x3d, 0x34, 0xd0, 0xc1, 0xa1, 0x81, 0xbe, 0x1f, + 0x1a, 0xe8, 0xfd, 0x91, 0x31, 0x71, 0x70, 0x64, 0x4c, 0x7c, 0x3b, 0x32, 0x26, 0xde, 0xcc, 0x39, + 0xbc, 0x3f, 0x9a, 0x4b, 0xa7, 0xef, 0x6f, 0xeb, 0xa3, 0xde, 0xaf, 0xd5, 0xbf, 0x7d, 0x0d, 0xef, + 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x31, 0x31, 0x24, 0xab, 0x51, 0x0b, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// GatewayVisibilityManagerClient is the client API for GatewayVisibilityManager service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type GatewayVisibilityManagerClient interface { + // Get the Default Gateway Visibility. + GetDefaultVisibility(ctx context.Context, in *GetDefaultGatewayVisibilityRequest, opts ...grpc.CallOption) (*GetGatewayVisibilityResponse, error) + // Set the Default Gateway Visibility. + SetDefaultVisibility(ctx context.Context, in *SetDefaultGatewayVisibilityRequest, opts ...grpc.CallOption) (*types.Empty, error) + // Get the Gateway Visibility with the Home Network. + GetHomeNetworkVisibility(ctx context.Context, in *GetHomeNetworkGatewayVisibilityRequest, opts ...grpc.CallOption) (*GetGatewayVisibilityResponse, error) + // Set the Gateway Visibility with the Home Network. + SetHomeNetworkVisibility(ctx context.Context, in *SetHomeNetworkGatewayVisibilityRequest, opts ...grpc.CallOption) (*types.Empty, error) +} + +type gatewayVisibilityManagerClient struct { + cc *grpc.ClientConn +} + +func NewGatewayVisibilityManagerClient(cc *grpc.ClientConn) GatewayVisibilityManagerClient { + return &gatewayVisibilityManagerClient{cc} +} + +func (c *gatewayVisibilityManagerClient) GetDefaultVisibility(ctx context.Context, in *GetDefaultGatewayVisibilityRequest, opts ...grpc.CallOption) (*GetGatewayVisibilityResponse, error) { + out := new(GetGatewayVisibilityResponse) + err := c.cc.Invoke(ctx, "/org.packetbroker.v1alpha1.GatewayVisibilityManager/GetDefaultVisibility", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gatewayVisibilityManagerClient) SetDefaultVisibility(ctx context.Context, in *SetDefaultGatewayVisibilityRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/org.packetbroker.v1alpha1.GatewayVisibilityManager/SetDefaultVisibility", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gatewayVisibilityManagerClient) GetHomeNetworkVisibility(ctx context.Context, in *GetHomeNetworkGatewayVisibilityRequest, opts ...grpc.CallOption) (*GetGatewayVisibilityResponse, error) { + out := new(GetGatewayVisibilityResponse) + err := c.cc.Invoke(ctx, "/org.packetbroker.v1alpha1.GatewayVisibilityManager/GetHomeNetworkVisibility", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gatewayVisibilityManagerClient) SetHomeNetworkVisibility(ctx context.Context, in *SetHomeNetworkGatewayVisibilityRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/org.packetbroker.v1alpha1.GatewayVisibilityManager/SetHomeNetworkVisibility", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// GatewayVisibilityManagerServer is the server API for GatewayVisibilityManager service. +type GatewayVisibilityManagerServer interface { + // Get the Default Gateway Visibility. + GetDefaultVisibility(context.Context, *GetDefaultGatewayVisibilityRequest) (*GetGatewayVisibilityResponse, error) + // Set the Default Gateway Visibility. + SetDefaultVisibility(context.Context, *SetDefaultGatewayVisibilityRequest) (*types.Empty, error) + // Get the Gateway Visibility with the Home Network. + GetHomeNetworkVisibility(context.Context, *GetHomeNetworkGatewayVisibilityRequest) (*GetGatewayVisibilityResponse, error) + // Set the Gateway Visibility with the Home Network. + SetHomeNetworkVisibility(context.Context, *SetHomeNetworkGatewayVisibilityRequest) (*types.Empty, error) +} + +// UnimplementedGatewayVisibilityManagerServer can be embedded to have forward compatible implementations. +type UnimplementedGatewayVisibilityManagerServer struct { +} + +func (*UnimplementedGatewayVisibilityManagerServer) GetDefaultVisibility(ctx context.Context, req *GetDefaultGatewayVisibilityRequest) (*GetGatewayVisibilityResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDefaultVisibility not implemented") +} +func (*UnimplementedGatewayVisibilityManagerServer) SetDefaultVisibility(ctx context.Context, req *SetDefaultGatewayVisibilityRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetDefaultVisibility not implemented") +} +func (*UnimplementedGatewayVisibilityManagerServer) GetHomeNetworkVisibility(ctx context.Context, req *GetHomeNetworkGatewayVisibilityRequest) (*GetGatewayVisibilityResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetHomeNetworkVisibility not implemented") +} +func (*UnimplementedGatewayVisibilityManagerServer) SetHomeNetworkVisibility(ctx context.Context, req *SetHomeNetworkGatewayVisibilityRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetHomeNetworkVisibility not implemented") +} + +func RegisterGatewayVisibilityManagerServer(s *grpc.Server, srv GatewayVisibilityManagerServer) { + s.RegisterService(&_GatewayVisibilityManager_serviceDesc, srv) +} + +func _GatewayVisibilityManager_GetDefaultVisibility_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDefaultGatewayVisibilityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GatewayVisibilityManagerServer).GetDefaultVisibility(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/org.packetbroker.v1alpha1.GatewayVisibilityManager/GetDefaultVisibility", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GatewayVisibilityManagerServer).GetDefaultVisibility(ctx, req.(*GetDefaultGatewayVisibilityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GatewayVisibilityManager_SetDefaultVisibility_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetDefaultGatewayVisibilityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GatewayVisibilityManagerServer).SetDefaultVisibility(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/org.packetbroker.v1alpha1.GatewayVisibilityManager/SetDefaultVisibility", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GatewayVisibilityManagerServer).SetDefaultVisibility(ctx, req.(*SetDefaultGatewayVisibilityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GatewayVisibilityManager_GetHomeNetworkVisibility_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetHomeNetworkGatewayVisibilityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GatewayVisibilityManagerServer).GetHomeNetworkVisibility(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/org.packetbroker.v1alpha1.GatewayVisibilityManager/GetHomeNetworkVisibility", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GatewayVisibilityManagerServer).GetHomeNetworkVisibility(ctx, req.(*GetHomeNetworkGatewayVisibilityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GatewayVisibilityManager_SetHomeNetworkVisibility_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetHomeNetworkGatewayVisibilityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GatewayVisibilityManagerServer).SetHomeNetworkVisibility(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/org.packetbroker.v1alpha1.GatewayVisibilityManager/SetHomeNetworkVisibility", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GatewayVisibilityManagerServer).SetHomeNetworkVisibility(ctx, req.(*SetHomeNetworkGatewayVisibilityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _GatewayVisibilityManager_serviceDesc = grpc.ServiceDesc{ + ServiceName: "org.packetbroker.v1alpha1.GatewayVisibilityManager", + HandlerType: (*GatewayVisibilityManagerServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetDefaultVisibility", + Handler: _GatewayVisibilityManager_GetDefaultVisibility_Handler, + }, + { + MethodName: "SetDefaultVisibility", + Handler: _GatewayVisibilityManager_SetDefaultVisibility_Handler, + }, + { + MethodName: "GetHomeNetworkVisibility", + Handler: _GatewayVisibilityManager_GetHomeNetworkVisibility_Handler, + }, + { + MethodName: "SetHomeNetworkVisibility", + Handler: _GatewayVisibilityManager_SetHomeNetworkVisibility_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "packetbroker/api/v1alpha1/mapping_services.proto", +} + +// ForwarderMapperClient is the client API for ForwarderMapper service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ForwarderMapperClient interface { + // Update a gateway. + UpdateGateway(ctx context.Context, in *UpdateForwarderGatewayRequest, opts ...grpc.CallOption) (*types.Empty, error) +} + +type forwarderMapperClient struct { + cc *grpc.ClientConn +} + +func NewForwarderMapperClient(cc *grpc.ClientConn) ForwarderMapperClient { + return &forwarderMapperClient{cc} +} + +func (c *forwarderMapperClient) UpdateGateway(ctx context.Context, in *UpdateForwarderGatewayRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/org.packetbroker.v1alpha1.ForwarderMapper/UpdateGateway", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ForwarderMapperServer is the server API for ForwarderMapper service. +type ForwarderMapperServer interface { + // Update a gateway. + UpdateGateway(context.Context, *UpdateForwarderGatewayRequest) (*types.Empty, error) +} + +// UnimplementedForwarderMapperServer can be embedded to have forward compatible implementations. +type UnimplementedForwarderMapperServer struct { +} + +func (*UnimplementedForwarderMapperServer) UpdateGateway(ctx context.Context, req *UpdateForwarderGatewayRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateGateway not implemented") +} + +func RegisterForwarderMapperServer(s *grpc.Server, srv ForwarderMapperServer) { + s.RegisterService(&_ForwarderMapper_serviceDesc, srv) +} + +func _ForwarderMapper_UpdateGateway_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateForwarderGatewayRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ForwarderMapperServer).UpdateGateway(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/org.packetbroker.v1alpha1.ForwarderMapper/UpdateGateway", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ForwarderMapperServer).UpdateGateway(ctx, req.(*UpdateForwarderGatewayRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ForwarderMapper_serviceDesc = grpc.ServiceDesc{ + ServiceName: "org.packetbroker.v1alpha1.ForwarderMapper", + HandlerType: (*ForwarderMapperServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateGateway", + Handler: _ForwarderMapper_UpdateGateway_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "packetbroker/api/v1alpha1/mapping_services.proto", +} + +// HomeNetworkMapperClient is the client API for HomeNetworkMapper service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type HomeNetworkMapperClient interface { + // List gateways. + // This rpc sets the total number of gateways in the x-total-count header. + ListGateways(ctx context.Context, in *ListHomeNetworkGatewaysRequest, opts ...grpc.CallOption) (*Gateways, error) + // Get a gateway. + GetGateway(ctx context.Context, in *GetHomeNetworkGatewayRequest, opts ...grpc.CallOption) (*Gateway, error) + // Subscribe to gateway updates. + SubscribeGateway(ctx context.Context, in *SubscribeHomeNetworkGatewaysRequest, opts ...grpc.CallOption) (HomeNetworkMapper_SubscribeGatewayClient, error) +} + +type homeNetworkMapperClient struct { + cc *grpc.ClientConn +} + +func NewHomeNetworkMapperClient(cc *grpc.ClientConn) HomeNetworkMapperClient { + return &homeNetworkMapperClient{cc} +} + +func (c *homeNetworkMapperClient) ListGateways(ctx context.Context, in *ListHomeNetworkGatewaysRequest, opts ...grpc.CallOption) (*Gateways, error) { + out := new(Gateways) + err := c.cc.Invoke(ctx, "/org.packetbroker.v1alpha1.HomeNetworkMapper/ListGateways", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *homeNetworkMapperClient) GetGateway(ctx context.Context, in *GetHomeNetworkGatewayRequest, opts ...grpc.CallOption) (*Gateway, error) { + out := new(Gateway) + err := c.cc.Invoke(ctx, "/org.packetbroker.v1alpha1.HomeNetworkMapper/GetGateway", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *homeNetworkMapperClient) SubscribeGateway(ctx context.Context, in *SubscribeHomeNetworkGatewaysRequest, opts ...grpc.CallOption) (HomeNetworkMapper_SubscribeGatewayClient, error) { + stream, err := c.cc.NewStream(ctx, &_HomeNetworkMapper_serviceDesc.Streams[0], "/org.packetbroker.v1alpha1.HomeNetworkMapper/SubscribeGateway", opts...) + if err != nil { + return nil, err + } + x := &homeNetworkMapperSubscribeGatewayClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type HomeNetworkMapper_SubscribeGatewayClient interface { + Recv() (*Gateway, error) + grpc.ClientStream +} + +type homeNetworkMapperSubscribeGatewayClient struct { + grpc.ClientStream +} + +func (x *homeNetworkMapperSubscribeGatewayClient) Recv() (*Gateway, error) { + m := new(Gateway) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// HomeNetworkMapperServer is the server API for HomeNetworkMapper service. +type HomeNetworkMapperServer interface { + // List gateways. + // This rpc sets the total number of gateways in the x-total-count header. + ListGateways(context.Context, *ListHomeNetworkGatewaysRequest) (*Gateways, error) + // Get a gateway. + GetGateway(context.Context, *GetHomeNetworkGatewayRequest) (*Gateway, error) + // Subscribe to gateway updates. + SubscribeGateway(*SubscribeHomeNetworkGatewaysRequest, HomeNetworkMapper_SubscribeGatewayServer) error +} + +// UnimplementedHomeNetworkMapperServer can be embedded to have forward compatible implementations. +type UnimplementedHomeNetworkMapperServer struct { +} + +func (*UnimplementedHomeNetworkMapperServer) ListGateways(ctx context.Context, req *ListHomeNetworkGatewaysRequest) (*Gateways, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListGateways not implemented") +} +func (*UnimplementedHomeNetworkMapperServer) GetGateway(ctx context.Context, req *GetHomeNetworkGatewayRequest) (*Gateway, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGateway not implemented") +} +func (*UnimplementedHomeNetworkMapperServer) SubscribeGateway(req *SubscribeHomeNetworkGatewaysRequest, srv HomeNetworkMapper_SubscribeGatewayServer) error { + return status.Errorf(codes.Unimplemented, "method SubscribeGateway not implemented") +} + +func RegisterHomeNetworkMapperServer(s *grpc.Server, srv HomeNetworkMapperServer) { + s.RegisterService(&_HomeNetworkMapper_serviceDesc, srv) +} + +func _HomeNetworkMapper_ListGateways_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListHomeNetworkGatewaysRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HomeNetworkMapperServer).ListGateways(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/org.packetbroker.v1alpha1.HomeNetworkMapper/ListGateways", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HomeNetworkMapperServer).ListGateways(ctx, req.(*ListHomeNetworkGatewaysRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HomeNetworkMapper_GetGateway_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetHomeNetworkGatewayRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HomeNetworkMapperServer).GetGateway(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/org.packetbroker.v1alpha1.HomeNetworkMapper/GetGateway", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HomeNetworkMapperServer).GetGateway(ctx, req.(*GetHomeNetworkGatewayRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _HomeNetworkMapper_SubscribeGateway_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SubscribeHomeNetworkGatewaysRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(HomeNetworkMapperServer).SubscribeGateway(m, &homeNetworkMapperSubscribeGatewayServer{stream}) +} + +type HomeNetworkMapper_SubscribeGatewayServer interface { + Send(*Gateway) error + grpc.ServerStream +} + +type homeNetworkMapperSubscribeGatewayServer struct { + grpc.ServerStream +} + +func (x *homeNetworkMapperSubscribeGatewayServer) Send(m *Gateway) error { + return x.ServerStream.SendMsg(m) +} + +var _HomeNetworkMapper_serviceDesc = grpc.ServiceDesc{ + ServiceName: "org.packetbroker.v1alpha1.HomeNetworkMapper", + HandlerType: (*HomeNetworkMapperServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListGateways", + Handler: _HomeNetworkMapper_ListGateways_Handler, + }, + { + MethodName: "GetGateway", + Handler: _HomeNetworkMapper_GetGateway_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "SubscribeGateway", + Handler: _HomeNetworkMapper_SubscribeGateway_Handler, + ServerStreams: true, + }, + }, + Metadata: "packetbroker/api/v1alpha1/mapping_services.proto", +} + +func (m *GetDefaultGatewayVisibilityRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetDefaultGatewayVisibilityRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetDefaultGatewayVisibilityRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ForwarderId) > 0 { + i -= len(m.ForwarderId) + copy(dAtA[i:], m.ForwarderId) + i = encodeVarintMappingServices(dAtA, i, uint64(len(m.ForwarderId))) + i-- + dAtA[i] = 0x12 + } + if m.ForwarderNetId != 0 { + i = encodeVarintMappingServices(dAtA, i, uint64(m.ForwarderNetId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SetDefaultGatewayVisibilityRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SetDefaultGatewayVisibilityRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SetDefaultGatewayVisibilityRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Visibility != nil { + { + size, err := m.Visibility.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMappingServices(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.ForwarderId) > 0 { + i -= len(m.ForwarderId) + copy(dAtA[i:], m.ForwarderId) + i = encodeVarintMappingServices(dAtA, i, uint64(len(m.ForwarderId))) + i-- + dAtA[i] = 0x12 + } + if m.ForwarderNetId != 0 { + i = encodeVarintMappingServices(dAtA, i, uint64(m.ForwarderNetId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GetHomeNetworkGatewayVisibilityRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetHomeNetworkGatewayVisibilityRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetHomeNetworkGatewayVisibilityRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.HomeNetworkNetId != 0 { + i = encodeVarintMappingServices(dAtA, i, uint64(m.HomeNetworkNetId)) + i-- + dAtA[i] = 0x18 + } + if len(m.ForwarderId) > 0 { + i -= len(m.ForwarderId) + copy(dAtA[i:], m.ForwarderId) + i = encodeVarintMappingServices(dAtA, i, uint64(len(m.ForwarderId))) + i-- + dAtA[i] = 0x12 + } + if m.ForwarderNetId != 0 { + i = encodeVarintMappingServices(dAtA, i, uint64(m.ForwarderNetId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SetHomeNetworkGatewayVisibilityRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SetHomeNetworkGatewayVisibilityRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SetHomeNetworkGatewayVisibilityRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Visibility != nil { + { + size, err := m.Visibility.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMappingServices(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.HomeNetworkNetId != 0 { + i = encodeVarintMappingServices(dAtA, i, uint64(m.HomeNetworkNetId)) + i-- + dAtA[i] = 0x18 + } + if len(m.ForwarderId) > 0 { + i -= len(m.ForwarderId) + copy(dAtA[i:], m.ForwarderId) + i = encodeVarintMappingServices(dAtA, i, uint64(len(m.ForwarderId))) + i-- + dAtA[i] = 0x12 + } + if m.ForwarderNetId != 0 { + i = encodeVarintMappingServices(dAtA, i, uint64(m.ForwarderNetId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GetGatewayVisibilityResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetGatewayVisibilityResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetGatewayVisibilityResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Visibility != nil { + { + size, err := m.Visibility.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMappingServices(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UpdateForwarderGatewayRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateForwarderGatewayRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateForwarderGatewayRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Gateway != nil { + { + size, err := m.Gateway.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMappingServices(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.ForwarderId) > 0 { + i -= len(m.ForwarderId) + copy(dAtA[i:], m.ForwarderId) + i = encodeVarintMappingServices(dAtA, i, uint64(len(m.ForwarderId))) + i-- + dAtA[i] = 0x12 + } + if m.ForwarderNetId != 0 { + i = encodeVarintMappingServices(dAtA, i, uint64(m.ForwarderNetId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ListHomeNetworkGatewaysRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListHomeNetworkGatewaysRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListHomeNetworkGatewaysRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Page != 0 { + i = encodeVarintMappingServices(dAtA, i, uint64(m.Page)) + i-- + dAtA[i] = 0x18 + } + if m.Limit != 0 { + i = encodeVarintMappingServices(dAtA, i, uint64(m.Limit)) + i-- + dAtA[i] = 0x10 + } + if m.HomeNetworkNetId != 0 { + i = encodeVarintMappingServices(dAtA, i, uint64(m.HomeNetworkNetId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GetHomeNetworkGatewayRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetHomeNetworkGatewayRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetHomeNetworkGatewayRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Eui != 0 { + i = encodeVarintMappingServices(dAtA, i, uint64(m.Eui)) + i-- + dAtA[i] = 0x20 + } + if len(m.ForwarderId) > 0 { + i -= len(m.ForwarderId) + copy(dAtA[i:], m.ForwarderId) + i = encodeVarintMappingServices(dAtA, i, uint64(len(m.ForwarderId))) + i-- + dAtA[i] = 0x1a + } + if m.ForwarderNetId != 0 { + i = encodeVarintMappingServices(dAtA, i, uint64(m.ForwarderNetId)) + i-- + dAtA[i] = 0x10 + } + if m.HomeNetworkNetId != 0 { + i = encodeVarintMappingServices(dAtA, i, uint64(m.HomeNetworkNetId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SubscribeHomeNetworkGatewaysRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SubscribeHomeNetworkGatewaysRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SubscribeHomeNetworkGatewaysRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Group) > 0 { + i -= len(m.Group) + copy(dAtA[i:], m.Group) + i = encodeVarintMappingServices(dAtA, i, uint64(len(m.Group))) + i-- + dAtA[i] = 0x1a + } + if len(m.Gateways) > 0 { + for iNdEx := len(m.Gateways) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Gateways[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMappingServices(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.HomeNetworkNetId != 0 { + i = encodeVarintMappingServices(dAtA, i, uint64(m.HomeNetworkNetId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Euis) > 0 { + dAtA6 := make([]byte, len(m.Euis)*10) + var j5 int + for _, num := range m.Euis { + for num >= 1<<7 { + dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j5++ + } + dAtA6[j5] = uint8(num) + j5++ + } + i -= j5 + copy(dAtA[i:], dAtA6[:j5]) + i = encodeVarintMappingServices(dAtA, i, uint64(j5)) + i-- + dAtA[i] = 0x1a + } + if len(m.ForwarderId) > 0 { + i -= len(m.ForwarderId) + copy(dAtA[i:], m.ForwarderId) + i = encodeVarintMappingServices(dAtA, i, uint64(len(m.ForwarderId))) + i-- + dAtA[i] = 0x12 + } + if m.ForwarderNetId != 0 { + i = encodeVarintMappingServices(dAtA, i, uint64(m.ForwarderNetId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintMappingServices(dAtA []byte, offset int, v uint64) int { + offset -= sovMappingServices(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GetDefaultGatewayVisibilityRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ForwarderNetId != 0 { + n += 1 + sovMappingServices(uint64(m.ForwarderNetId)) + } + l = len(m.ForwarderId) + if l > 0 { + n += 1 + l + sovMappingServices(uint64(l)) + } + return n +} + +func (m *SetDefaultGatewayVisibilityRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ForwarderNetId != 0 { + n += 1 + sovMappingServices(uint64(m.ForwarderNetId)) + } + l = len(m.ForwarderId) + if l > 0 { + n += 1 + l + sovMappingServices(uint64(l)) + } + if m.Visibility != nil { + l = m.Visibility.Size() + n += 1 + l + sovMappingServices(uint64(l)) + } + return n +} + +func (m *GetHomeNetworkGatewayVisibilityRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ForwarderNetId != 0 { + n += 1 + sovMappingServices(uint64(m.ForwarderNetId)) + } + l = len(m.ForwarderId) + if l > 0 { + n += 1 + l + sovMappingServices(uint64(l)) + } + if m.HomeNetworkNetId != 0 { + n += 1 + sovMappingServices(uint64(m.HomeNetworkNetId)) + } + return n +} + +func (m *SetHomeNetworkGatewayVisibilityRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ForwarderNetId != 0 { + n += 1 + sovMappingServices(uint64(m.ForwarderNetId)) + } + l = len(m.ForwarderId) + if l > 0 { + n += 1 + l + sovMappingServices(uint64(l)) + } + if m.HomeNetworkNetId != 0 { + n += 1 + sovMappingServices(uint64(m.HomeNetworkNetId)) + } + if m.Visibility != nil { + l = m.Visibility.Size() + n += 1 + l + sovMappingServices(uint64(l)) + } + return n +} + +func (m *GetGatewayVisibilityResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Visibility != nil { + l = m.Visibility.Size() + n += 1 + l + sovMappingServices(uint64(l)) + } + return n +} + +func (m *UpdateForwarderGatewayRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ForwarderNetId != 0 { + n += 1 + sovMappingServices(uint64(m.ForwarderNetId)) + } + l = len(m.ForwarderId) + if l > 0 { + n += 1 + l + sovMappingServices(uint64(l)) + } + if m.Gateway != nil { + l = m.Gateway.Size() + n += 1 + l + sovMappingServices(uint64(l)) + } + return n +} + +func (m *ListHomeNetworkGatewaysRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.HomeNetworkNetId != 0 { + n += 1 + sovMappingServices(uint64(m.HomeNetworkNetId)) + } + if m.Limit != 0 { + n += 1 + sovMappingServices(uint64(m.Limit)) + } + if m.Page != 0 { + n += 1 + sovMappingServices(uint64(m.Page)) + } + return n +} + +func (m *GetHomeNetworkGatewayRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.HomeNetworkNetId != 0 { + n += 1 + sovMappingServices(uint64(m.HomeNetworkNetId)) + } + if m.ForwarderNetId != 0 { + n += 1 + sovMappingServices(uint64(m.ForwarderNetId)) + } + l = len(m.ForwarderId) + if l > 0 { + n += 1 + l + sovMappingServices(uint64(l)) + } + if m.Eui != 0 { + n += 1 + sovMappingServices(uint64(m.Eui)) + } + return n +} + +func (m *SubscribeHomeNetworkGatewaysRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.HomeNetworkNetId != 0 { + n += 1 + sovMappingServices(uint64(m.HomeNetworkNetId)) + } + if len(m.Gateways) > 0 { + for _, e := range m.Gateways { + l = e.Size() + n += 1 + l + sovMappingServices(uint64(l)) + } + } + l = len(m.Group) + if l > 0 { + n += 1 + l + sovMappingServices(uint64(l)) + } + return n +} + +func (m *SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ForwarderNetId != 0 { + n += 1 + sovMappingServices(uint64(m.ForwarderNetId)) + } + l = len(m.ForwarderId) + if l > 0 { + n += 1 + l + sovMappingServices(uint64(l)) + } + if len(m.Euis) > 0 { + l = 0 + for _, e := range m.Euis { + l += sovMappingServices(uint64(e)) + } + n += 1 + sovMappingServices(uint64(l)) + l + } + return n +} + +func sovMappingServices(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMappingServices(x uint64) (n int) { + return sovMappingServices(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GetDefaultGatewayVisibilityRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetDefaultGatewayVisibilityRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetDefaultGatewayVisibilityRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderNetId", wireType) + } + m.ForwarderNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ForwarderNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMappingServices + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMappingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForwarderId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMappingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMappingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMappingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SetDefaultGatewayVisibilityRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SetDefaultGatewayVisibilityRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SetDefaultGatewayVisibilityRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderNetId", wireType) + } + m.ForwarderNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ForwarderNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMappingServices + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMappingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForwarderId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Visibility", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMappingServices + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMappingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Visibility == nil { + m.Visibility = &GatewayVisibility{} + } + if err := m.Visibility.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMappingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMappingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMappingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetHomeNetworkGatewayVisibilityRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetHomeNetworkGatewayVisibilityRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetHomeNetworkGatewayVisibilityRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderNetId", wireType) + } + m.ForwarderNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ForwarderNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMappingServices + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMappingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForwarderId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HomeNetworkNetId", wireType) + } + m.HomeNetworkNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HomeNetworkNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMappingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMappingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMappingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SetHomeNetworkGatewayVisibilityRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SetHomeNetworkGatewayVisibilityRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SetHomeNetworkGatewayVisibilityRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderNetId", wireType) + } + m.ForwarderNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ForwarderNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMappingServices + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMappingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForwarderId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HomeNetworkNetId", wireType) + } + m.HomeNetworkNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HomeNetworkNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Visibility", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMappingServices + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMappingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Visibility == nil { + m.Visibility = &GatewayVisibility{} + } + if err := m.Visibility.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMappingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMappingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMappingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetGatewayVisibilityResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetGatewayVisibilityResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetGatewayVisibilityResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Visibility", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMappingServices + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMappingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Visibility == nil { + m.Visibility = &GatewayVisibility{} + } + if err := m.Visibility.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMappingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMappingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMappingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateForwarderGatewayRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateForwarderGatewayRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateForwarderGatewayRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderNetId", wireType) + } + m.ForwarderNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ForwarderNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMappingServices + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMappingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForwarderId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Gateway", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMappingServices + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMappingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Gateway == nil { + m.Gateway = &Gateway{} + } + if err := m.Gateway.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMappingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMappingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMappingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListHomeNetworkGatewaysRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListHomeNetworkGatewaysRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListHomeNetworkGatewaysRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HomeNetworkNetId", wireType) + } + m.HomeNetworkNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HomeNetworkNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Page", wireType) + } + m.Page = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Page |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMappingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMappingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMappingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetHomeNetworkGatewayRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetHomeNetworkGatewayRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetHomeNetworkGatewayRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HomeNetworkNetId", wireType) + } + m.HomeNetworkNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HomeNetworkNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderNetId", wireType) + } + m.ForwarderNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ForwarderNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMappingServices + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMappingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForwarderId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Eui", wireType) + } + m.Eui = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Eui |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMappingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMappingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMappingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubscribeHomeNetworkGatewaysRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubscribeHomeNetworkGatewaysRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubscribeHomeNetworkGatewaysRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HomeNetworkNetId", wireType) + } + m.HomeNetworkNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HomeNetworkNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Gateways", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMappingServices + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMappingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Gateways = append(m.Gateways, &SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs{}) + if err := m.Gateways[len(m.Gateways)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMappingServices + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMappingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Group = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMappingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMappingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMappingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubscribeHomeNetworkGatewaysRequest_ForwarderEUIs) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ForwarderEUIs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ForwarderEUIs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderNetId", wireType) + } + m.ForwarderNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ForwarderNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMappingServices + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMappingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForwarderId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Euis = append(m.Euis, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthMappingServices + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthMappingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Euis) == 0 { + m.Euis = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMappingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Euis = append(m.Euis, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Euis", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipMappingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMappingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMappingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMappingServices(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMappingServices + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMappingServices + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMappingServices + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthMappingServices + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMappingServices + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMappingServices + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMappingServices = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMappingServices = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMappingServices = fmt.Errorf("proto: unexpected end of group") +) diff --git a/v1alpha1/messages.pb.go b/v1alpha1/messages.pb.go new file mode 100644 index 0000000..117e432 --- /dev/null +++ b/v1alpha1/messages.pb.go @@ -0,0 +1,5855 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: packetbroker/api/v1alpha1/messages.proto + +package packetbroker + +import ( + encoding_binary "encoding/binary" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + types "github.com/gogo/protobuf/types" + io "io" + math "math" + math_bits "math/bits" +) + +// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Teaser of PHYPayload. +type PHYPayloadTeaser struct { + // SHA-256 hash of PHYPayload. + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // Types that are valid to be assigned to Payload: + // *PHYPayloadTeaser_JoinRequest + // *PHYPayloadTeaser_Mac + Payload isPHYPayloadTeaser_Payload `protobuf_oneof:"payload"` +} + +func (m *PHYPayloadTeaser) Reset() { *m = PHYPayloadTeaser{} } +func (m *PHYPayloadTeaser) String() string { return proto.CompactTextString(m) } +func (*PHYPayloadTeaser) ProtoMessage() {} +func (*PHYPayloadTeaser) Descriptor() ([]byte, []int) { + return fileDescriptor_6fdae513c2695c40, []int{0} +} +func (m *PHYPayloadTeaser) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PHYPayloadTeaser) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PHYPayloadTeaser.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PHYPayloadTeaser) XXX_Merge(src proto.Message) { + xxx_messageInfo_PHYPayloadTeaser.Merge(m, src) +} +func (m *PHYPayloadTeaser) XXX_Size() int { + return m.Size() +} +func (m *PHYPayloadTeaser) XXX_DiscardUnknown() { + xxx_messageInfo_PHYPayloadTeaser.DiscardUnknown(m) +} + +var xxx_messageInfo_PHYPayloadTeaser proto.InternalMessageInfo + +type isPHYPayloadTeaser_Payload interface { + isPHYPayloadTeaser_Payload() + MarshalTo([]byte) (int, error) + Size() int +} + +type PHYPayloadTeaser_JoinRequest struct { + JoinRequest *PHYPayloadTeaser_JoinRequestTeaser `protobuf:"bytes,2,opt,name=join_request,json=joinRequest,proto3,oneof" json:"join_request,omitempty"` +} +type PHYPayloadTeaser_Mac struct { + Mac *PHYPayloadTeaser_MACPayloadTeaser `protobuf:"bytes,3,opt,name=mac,proto3,oneof" json:"mac,omitempty"` +} + +func (*PHYPayloadTeaser_JoinRequest) isPHYPayloadTeaser_Payload() {} +func (*PHYPayloadTeaser_Mac) isPHYPayloadTeaser_Payload() {} + +func (m *PHYPayloadTeaser) GetPayload() isPHYPayloadTeaser_Payload { + if m != nil { + return m.Payload + } + return nil +} + +func (m *PHYPayloadTeaser) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +func (m *PHYPayloadTeaser) GetJoinRequest() *PHYPayloadTeaser_JoinRequestTeaser { + if x, ok := m.GetPayload().(*PHYPayloadTeaser_JoinRequest); ok { + return x.JoinRequest + } + return nil +} + +func (m *PHYPayloadTeaser) GetMac() *PHYPayloadTeaser_MACPayloadTeaser { + if x, ok := m.GetPayload().(*PHYPayloadTeaser_Mac); ok { + return x.Mac + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*PHYPayloadTeaser) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*PHYPayloadTeaser_JoinRequest)(nil), + (*PHYPayloadTeaser_Mac)(nil), + } +} + +type PHYPayloadTeaser_JoinRequestTeaser struct { + // JoinEUI of the join-request. + JoinEui uint64 `protobuf:"fixed64,1,opt,name=join_eui,json=joinEui,proto3" json:"join_eui,omitempty"` + // DevEUI of the join-request. + DevEui uint64 `protobuf:"fixed64,2,opt,name=dev_eui,json=devEui,proto3" json:"dev_eui,omitempty"` + // DevNonce of the join-request. + DevNonce uint32 `protobuf:"varint,3,opt,name=dev_nonce,json=devNonce,proto3" json:"dev_nonce,omitempty"` +} + +func (m *PHYPayloadTeaser_JoinRequestTeaser) Reset() { *m = PHYPayloadTeaser_JoinRequestTeaser{} } +func (m *PHYPayloadTeaser_JoinRequestTeaser) String() string { return proto.CompactTextString(m) } +func (*PHYPayloadTeaser_JoinRequestTeaser) ProtoMessage() {} +func (*PHYPayloadTeaser_JoinRequestTeaser) Descriptor() ([]byte, []int) { + return fileDescriptor_6fdae513c2695c40, []int{0, 0} +} +func (m *PHYPayloadTeaser_JoinRequestTeaser) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PHYPayloadTeaser_JoinRequestTeaser) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PHYPayloadTeaser_JoinRequestTeaser.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PHYPayloadTeaser_JoinRequestTeaser) XXX_Merge(src proto.Message) { + xxx_messageInfo_PHYPayloadTeaser_JoinRequestTeaser.Merge(m, src) +} +func (m *PHYPayloadTeaser_JoinRequestTeaser) XXX_Size() int { + return m.Size() +} +func (m *PHYPayloadTeaser_JoinRequestTeaser) XXX_DiscardUnknown() { + xxx_messageInfo_PHYPayloadTeaser_JoinRequestTeaser.DiscardUnknown(m) +} + +var xxx_messageInfo_PHYPayloadTeaser_JoinRequestTeaser proto.InternalMessageInfo + +func (m *PHYPayloadTeaser_JoinRequestTeaser) GetJoinEui() uint64 { + if m != nil { + return m.JoinEui + } + return 0 +} + +func (m *PHYPayloadTeaser_JoinRequestTeaser) GetDevEui() uint64 { + if m != nil { + return m.DevEui + } + return 0 +} + +func (m *PHYPayloadTeaser_JoinRequestTeaser) GetDevNonce() uint32 { + if m != nil { + return m.DevNonce + } + return 0 +} + +type PHYPayloadTeaser_MACPayloadTeaser struct { + // Indicates whether it is a confirmed or unconfirmed data uplink message. + Confirmed bool `protobuf:"varint,2,opt,name=confirmed,proto3" json:"confirmed,omitempty"` + // DevAddr of the message. + DevAddr uint32 `protobuf:"varint,3,opt,name=dev_addr,json=devAddr,proto3" json:"dev_addr,omitempty"` + // Indicates whether the PHYPayload contains FOpts. + FOpts bool `protobuf:"varint,4,opt,name=f_opts,json=fOpts,proto3" json:"f_opts,omitempty"` + // FCnt of the message. + FCnt uint32 `protobuf:"varint,5,opt,name=f_cnt,json=fCnt,proto3" json:"f_cnt,omitempty"` + // FPort of the message. + FPort uint32 `protobuf:"varint,6,opt,name=f_port,json=fPort,proto3" json:"f_port,omitempty"` + // Length of the FRMPayload. + FrmPayloadLength uint32 `protobuf:"varint,7,opt,name=frm_payload_length,json=frmPayloadLength,proto3" json:"frm_payload_length,omitempty"` +} + +func (m *PHYPayloadTeaser_MACPayloadTeaser) Reset() { *m = PHYPayloadTeaser_MACPayloadTeaser{} } +func (m *PHYPayloadTeaser_MACPayloadTeaser) String() string { return proto.CompactTextString(m) } +func (*PHYPayloadTeaser_MACPayloadTeaser) ProtoMessage() {} +func (*PHYPayloadTeaser_MACPayloadTeaser) Descriptor() ([]byte, []int) { + return fileDescriptor_6fdae513c2695c40, []int{0, 1} +} +func (m *PHYPayloadTeaser_MACPayloadTeaser) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PHYPayloadTeaser_MACPayloadTeaser) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PHYPayloadTeaser_MACPayloadTeaser.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PHYPayloadTeaser_MACPayloadTeaser) XXX_Merge(src proto.Message) { + xxx_messageInfo_PHYPayloadTeaser_MACPayloadTeaser.Merge(m, src) +} +func (m *PHYPayloadTeaser_MACPayloadTeaser) XXX_Size() int { + return m.Size() +} +func (m *PHYPayloadTeaser_MACPayloadTeaser) XXX_DiscardUnknown() { + xxx_messageInfo_PHYPayloadTeaser_MACPayloadTeaser.DiscardUnknown(m) +} + +var xxx_messageInfo_PHYPayloadTeaser_MACPayloadTeaser proto.InternalMessageInfo + +func (m *PHYPayloadTeaser_MACPayloadTeaser) GetConfirmed() bool { + if m != nil { + return m.Confirmed + } + return false +} + +func (m *PHYPayloadTeaser_MACPayloadTeaser) GetDevAddr() uint32 { + if m != nil { + return m.DevAddr + } + return 0 +} + +func (m *PHYPayloadTeaser_MACPayloadTeaser) GetFOpts() bool { + if m != nil { + return m.FOpts + } + return false +} + +func (m *PHYPayloadTeaser_MACPayloadTeaser) GetFCnt() uint32 { + if m != nil { + return m.FCnt + } + return 0 +} + +func (m *PHYPayloadTeaser_MACPayloadTeaser) GetFPort() uint32 { + if m != nil { + return m.FPort + } + return 0 +} + +func (m *PHYPayloadTeaser_MACPayloadTeaser) GetFrmPayloadLength() uint32 { + if m != nil { + return m.FrmPayloadLength + } + return 0 +} + +// Teaser of gateway metadata. +type GatewayMetadataTeaser struct { + // Types that are valid to be assigned to Value: + // *GatewayMetadataTeaser_Terrestrial_ + // *GatewayMetadataTeaser_Satellite_ + Value isGatewayMetadataTeaser_Value `protobuf_oneof:"value"` +} + +func (m *GatewayMetadataTeaser) Reset() { *m = GatewayMetadataTeaser{} } +func (m *GatewayMetadataTeaser) String() string { return proto.CompactTextString(m) } +func (*GatewayMetadataTeaser) ProtoMessage() {} +func (*GatewayMetadataTeaser) Descriptor() ([]byte, []int) { + return fileDescriptor_6fdae513c2695c40, []int{1} +} +func (m *GatewayMetadataTeaser) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GatewayMetadataTeaser) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GatewayMetadataTeaser.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GatewayMetadataTeaser) XXX_Merge(src proto.Message) { + xxx_messageInfo_GatewayMetadataTeaser.Merge(m, src) +} +func (m *GatewayMetadataTeaser) XXX_Size() int { + return m.Size() +} +func (m *GatewayMetadataTeaser) XXX_DiscardUnknown() { + xxx_messageInfo_GatewayMetadataTeaser.DiscardUnknown(m) +} + +var xxx_messageInfo_GatewayMetadataTeaser proto.InternalMessageInfo + +type isGatewayMetadataTeaser_Value interface { + isGatewayMetadataTeaser_Value() + MarshalTo([]byte) (int, error) + Size() int +} + +type GatewayMetadataTeaser_Terrestrial_ struct { + Terrestrial *GatewayMetadataTeaser_Terrestrial `protobuf:"bytes,1,opt,name=terrestrial,proto3,oneof" json:"terrestrial,omitempty"` +} +type GatewayMetadataTeaser_Satellite_ struct { + Satellite *GatewayMetadataTeaser_Satellite `protobuf:"bytes,2,opt,name=satellite,proto3,oneof" json:"satellite,omitempty"` +} + +func (*GatewayMetadataTeaser_Terrestrial_) isGatewayMetadataTeaser_Value() {} +func (*GatewayMetadataTeaser_Satellite_) isGatewayMetadataTeaser_Value() {} + +func (m *GatewayMetadataTeaser) GetValue() isGatewayMetadataTeaser_Value { + if m != nil { + return m.Value + } + return nil +} + +func (m *GatewayMetadataTeaser) GetTerrestrial() *GatewayMetadataTeaser_Terrestrial { + if x, ok := m.GetValue().(*GatewayMetadataTeaser_Terrestrial_); ok { + return x.Terrestrial + } + return nil +} + +func (m *GatewayMetadataTeaser) GetSatellite() *GatewayMetadataTeaser_Satellite { + if x, ok := m.GetValue().(*GatewayMetadataTeaser_Satellite_); ok { + return x.Satellite + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*GatewayMetadataTeaser) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*GatewayMetadataTeaser_Terrestrial_)(nil), + (*GatewayMetadataTeaser_Satellite_)(nil), + } +} + +type GatewayMetadataTeaser_Terrestrial struct { + // Indicates whether the metadata contains a fine timestamp. + FineTimestamp bool `protobuf:"varint,2,opt,name=fine_timestamp,json=fineTimestamp,proto3" json:"fine_timestamp,omitempty"` +} + +func (m *GatewayMetadataTeaser_Terrestrial) Reset() { *m = GatewayMetadataTeaser_Terrestrial{} } +func (m *GatewayMetadataTeaser_Terrestrial) String() string { return proto.CompactTextString(m) } +func (*GatewayMetadataTeaser_Terrestrial) ProtoMessage() {} +func (*GatewayMetadataTeaser_Terrestrial) Descriptor() ([]byte, []int) { + return fileDescriptor_6fdae513c2695c40, []int{1, 0} +} +func (m *GatewayMetadataTeaser_Terrestrial) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GatewayMetadataTeaser_Terrestrial) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GatewayMetadataTeaser_Terrestrial.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GatewayMetadataTeaser_Terrestrial) XXX_Merge(src proto.Message) { + xxx_messageInfo_GatewayMetadataTeaser_Terrestrial.Merge(m, src) +} +func (m *GatewayMetadataTeaser_Terrestrial) XXX_Size() int { + return m.Size() +} +func (m *GatewayMetadataTeaser_Terrestrial) XXX_DiscardUnknown() { + xxx_messageInfo_GatewayMetadataTeaser_Terrestrial.DiscardUnknown(m) +} + +var xxx_messageInfo_GatewayMetadataTeaser_Terrestrial proto.InternalMessageInfo + +func (m *GatewayMetadataTeaser_Terrestrial) GetFineTimestamp() bool { + if m != nil { + return m.FineTimestamp + } + return false +} + +type GatewayMetadataTeaser_Satellite struct { +} + +func (m *GatewayMetadataTeaser_Satellite) Reset() { *m = GatewayMetadataTeaser_Satellite{} } +func (m *GatewayMetadataTeaser_Satellite) String() string { return proto.CompactTextString(m) } +func (*GatewayMetadataTeaser_Satellite) ProtoMessage() {} +func (*GatewayMetadataTeaser_Satellite) Descriptor() ([]byte, []int) { + return fileDescriptor_6fdae513c2695c40, []int{1, 1} +} +func (m *GatewayMetadataTeaser_Satellite) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GatewayMetadataTeaser_Satellite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GatewayMetadataTeaser_Satellite.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GatewayMetadataTeaser_Satellite) XXX_Merge(src proto.Message) { + xxx_messageInfo_GatewayMetadataTeaser_Satellite.Merge(m, src) +} +func (m *GatewayMetadataTeaser_Satellite) XXX_Size() int { + return m.Size() +} +func (m *GatewayMetadataTeaser_Satellite) XXX_DiscardUnknown() { + xxx_messageInfo_GatewayMetadataTeaser_Satellite.DiscardUnknown(m) +} + +var xxx_messageInfo_GatewayMetadataTeaser_Satellite proto.InternalMessageInfo + +// Terrestrial gateway antenna signal quality. +type TerrestrialGatewayAntennaSignalQuality struct { + // Received signal strength indicator of the channel (dBm). + ChannelRssi float32 `protobuf:"fixed32,1,opt,name=channel_rssi,json=channelRssi,proto3" json:"channel_rssi,omitempty"` + // Received signal strength indicator of the signal (dBm). + SignalRssi *types.FloatValue `protobuf:"bytes,2,opt,name=signal_rssi,json=signalRssi,proto3" json:"signal_rssi,omitempty"` + // Standard deviation of the RSSI during preamble. + RssiStandardDeviation *types.FloatValue `protobuf:"bytes,3,opt,name=rssi_standard_deviation,json=rssiStandardDeviation,proto3" json:"rssi_standard_deviation,omitempty"` + // Signal-to-noise ratio (dB). + Snr float32 `protobuf:"fixed32,4,opt,name=snr,proto3" json:"snr,omitempty"` + // Frequency offset (Hz). + FrequencyOffset int64 `protobuf:"varint,5,opt,name=frequency_offset,json=frequencyOffset,proto3" json:"frequency_offset,omitempty"` +} + +func (m *TerrestrialGatewayAntennaSignalQuality) Reset() { + *m = TerrestrialGatewayAntennaSignalQuality{} +} +func (m *TerrestrialGatewayAntennaSignalQuality) String() string { return proto.CompactTextString(m) } +func (*TerrestrialGatewayAntennaSignalQuality) ProtoMessage() {} +func (*TerrestrialGatewayAntennaSignalQuality) Descriptor() ([]byte, []int) { + return fileDescriptor_6fdae513c2695c40, []int{2} +} +func (m *TerrestrialGatewayAntennaSignalQuality) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TerrestrialGatewayAntennaSignalQuality) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TerrestrialGatewayAntennaSignalQuality.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TerrestrialGatewayAntennaSignalQuality) XXX_Merge(src proto.Message) { + xxx_messageInfo_TerrestrialGatewayAntennaSignalQuality.Merge(m, src) +} +func (m *TerrestrialGatewayAntennaSignalQuality) XXX_Size() int { + return m.Size() +} +func (m *TerrestrialGatewayAntennaSignalQuality) XXX_DiscardUnknown() { + xxx_messageInfo_TerrestrialGatewayAntennaSignalQuality.DiscardUnknown(m) +} + +var xxx_messageInfo_TerrestrialGatewayAntennaSignalQuality proto.InternalMessageInfo + +func (m *TerrestrialGatewayAntennaSignalQuality) GetChannelRssi() float32 { + if m != nil { + return m.ChannelRssi + } + return 0 +} + +func (m *TerrestrialGatewayAntennaSignalQuality) GetSignalRssi() *types.FloatValue { + if m != nil { + return m.SignalRssi + } + return nil +} + +func (m *TerrestrialGatewayAntennaSignalQuality) GetRssiStandardDeviation() *types.FloatValue { + if m != nil { + return m.RssiStandardDeviation + } + return nil +} + +func (m *TerrestrialGatewayAntennaSignalQuality) GetSnr() float32 { + if m != nil { + return m.Snr + } + return 0 +} + +func (m *TerrestrialGatewayAntennaSignalQuality) GetFrequencyOffset() int64 { + if m != nil { + return m.FrequencyOffset + } + return 0 +} + +// Gateway metadata signal quality. +type GatewayMetadataSignalQuality struct { + // Types that are valid to be assigned to Value: + // *GatewayMetadataSignalQuality_Terrestrial_ + // *GatewayMetadataSignalQuality_Satellite_ + Value isGatewayMetadataSignalQuality_Value `protobuf_oneof:"value"` +} + +func (m *GatewayMetadataSignalQuality) Reset() { *m = GatewayMetadataSignalQuality{} } +func (m *GatewayMetadataSignalQuality) String() string { return proto.CompactTextString(m) } +func (*GatewayMetadataSignalQuality) ProtoMessage() {} +func (*GatewayMetadataSignalQuality) Descriptor() ([]byte, []int) { + return fileDescriptor_6fdae513c2695c40, []int{3} +} +func (m *GatewayMetadataSignalQuality) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GatewayMetadataSignalQuality) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GatewayMetadataSignalQuality.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GatewayMetadataSignalQuality) XXX_Merge(src proto.Message) { + xxx_messageInfo_GatewayMetadataSignalQuality.Merge(m, src) +} +func (m *GatewayMetadataSignalQuality) XXX_Size() int { + return m.Size() +} +func (m *GatewayMetadataSignalQuality) XXX_DiscardUnknown() { + xxx_messageInfo_GatewayMetadataSignalQuality.DiscardUnknown(m) +} + +var xxx_messageInfo_GatewayMetadataSignalQuality proto.InternalMessageInfo + +type isGatewayMetadataSignalQuality_Value interface { + isGatewayMetadataSignalQuality_Value() + MarshalTo([]byte) (int, error) + Size() int +} + +type GatewayMetadataSignalQuality_Terrestrial_ struct { + Terrestrial *GatewayMetadataSignalQuality_Terrestrial `protobuf:"bytes,1,opt,name=terrestrial,proto3,oneof" json:"terrestrial,omitempty"` +} +type GatewayMetadataSignalQuality_Satellite_ struct { + Satellite *GatewayMetadataSignalQuality_Satellite `protobuf:"bytes,2,opt,name=satellite,proto3,oneof" json:"satellite,omitempty"` +} + +func (*GatewayMetadataSignalQuality_Terrestrial_) isGatewayMetadataSignalQuality_Value() {} +func (*GatewayMetadataSignalQuality_Satellite_) isGatewayMetadataSignalQuality_Value() {} + +func (m *GatewayMetadataSignalQuality) GetValue() isGatewayMetadataSignalQuality_Value { + if m != nil { + return m.Value + } + return nil +} + +func (m *GatewayMetadataSignalQuality) GetTerrestrial() *GatewayMetadataSignalQuality_Terrestrial { + if x, ok := m.GetValue().(*GatewayMetadataSignalQuality_Terrestrial_); ok { + return x.Terrestrial + } + return nil +} + +func (m *GatewayMetadataSignalQuality) GetSatellite() *GatewayMetadataSignalQuality_Satellite { + if x, ok := m.GetValue().(*GatewayMetadataSignalQuality_Satellite_); ok { + return x.Satellite + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*GatewayMetadataSignalQuality) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*GatewayMetadataSignalQuality_Terrestrial_)(nil), + (*GatewayMetadataSignalQuality_Satellite_)(nil), + } +} + +type GatewayMetadataSignalQuality_Terrestrial struct { + Antennas []*GatewayMetadataSignalQuality_Terrestrial_Antenna `protobuf:"bytes,1,rep,name=antennas,proto3" json:"antennas,omitempty"` +} + +func (m *GatewayMetadataSignalQuality_Terrestrial) Reset() { + *m = GatewayMetadataSignalQuality_Terrestrial{} +} +func (m *GatewayMetadataSignalQuality_Terrestrial) String() string { return proto.CompactTextString(m) } +func (*GatewayMetadataSignalQuality_Terrestrial) ProtoMessage() {} +func (*GatewayMetadataSignalQuality_Terrestrial) Descriptor() ([]byte, []int) { + return fileDescriptor_6fdae513c2695c40, []int{3, 0} +} +func (m *GatewayMetadataSignalQuality_Terrestrial) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GatewayMetadataSignalQuality_Terrestrial) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GatewayMetadataSignalQuality_Terrestrial.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GatewayMetadataSignalQuality_Terrestrial) XXX_Merge(src proto.Message) { + xxx_messageInfo_GatewayMetadataSignalQuality_Terrestrial.Merge(m, src) +} +func (m *GatewayMetadataSignalQuality_Terrestrial) XXX_Size() int { + return m.Size() +} +func (m *GatewayMetadataSignalQuality_Terrestrial) XXX_DiscardUnknown() { + xxx_messageInfo_GatewayMetadataSignalQuality_Terrestrial.DiscardUnknown(m) +} + +var xxx_messageInfo_GatewayMetadataSignalQuality_Terrestrial proto.InternalMessageInfo + +func (m *GatewayMetadataSignalQuality_Terrestrial) GetAntennas() []*GatewayMetadataSignalQuality_Terrestrial_Antenna { + if m != nil { + return m.Antennas + } + return nil +} + +type GatewayMetadataSignalQuality_Terrestrial_Antenna struct { + Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` + Value *TerrestrialGatewayAntennaSignalQuality `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *GatewayMetadataSignalQuality_Terrestrial_Antenna) Reset() { + *m = GatewayMetadataSignalQuality_Terrestrial_Antenna{} +} +func (m *GatewayMetadataSignalQuality_Terrestrial_Antenna) String() string { + return proto.CompactTextString(m) +} +func (*GatewayMetadataSignalQuality_Terrestrial_Antenna) ProtoMessage() {} +func (*GatewayMetadataSignalQuality_Terrestrial_Antenna) Descriptor() ([]byte, []int) { + return fileDescriptor_6fdae513c2695c40, []int{3, 0, 0} +} +func (m *GatewayMetadataSignalQuality_Terrestrial_Antenna) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GatewayMetadataSignalQuality_Terrestrial_Antenna) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GatewayMetadataSignalQuality_Terrestrial_Antenna.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GatewayMetadataSignalQuality_Terrestrial_Antenna) XXX_Merge(src proto.Message) { + xxx_messageInfo_GatewayMetadataSignalQuality_Terrestrial_Antenna.Merge(m, src) +} +func (m *GatewayMetadataSignalQuality_Terrestrial_Antenna) XXX_Size() int { + return m.Size() +} +func (m *GatewayMetadataSignalQuality_Terrestrial_Antenna) XXX_DiscardUnknown() { + xxx_messageInfo_GatewayMetadataSignalQuality_Terrestrial_Antenna.DiscardUnknown(m) +} + +var xxx_messageInfo_GatewayMetadataSignalQuality_Terrestrial_Antenna proto.InternalMessageInfo + +func (m *GatewayMetadataSignalQuality_Terrestrial_Antenna) GetIndex() uint32 { + if m != nil { + return m.Index + } + return 0 +} + +func (m *GatewayMetadataSignalQuality_Terrestrial_Antenna) GetValue() *TerrestrialGatewayAntennaSignalQuality { + if m != nil { + return m.Value + } + return nil +} + +type GatewayMetadataSignalQuality_Satellite struct { +} + +func (m *GatewayMetadataSignalQuality_Satellite) Reset() { + *m = GatewayMetadataSignalQuality_Satellite{} +} +func (m *GatewayMetadataSignalQuality_Satellite) String() string { return proto.CompactTextString(m) } +func (*GatewayMetadataSignalQuality_Satellite) ProtoMessage() {} +func (*GatewayMetadataSignalQuality_Satellite) Descriptor() ([]byte, []int) { + return fileDescriptor_6fdae513c2695c40, []int{3, 1} +} +func (m *GatewayMetadataSignalQuality_Satellite) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GatewayMetadataSignalQuality_Satellite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GatewayMetadataSignalQuality_Satellite.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GatewayMetadataSignalQuality_Satellite) XXX_Merge(src proto.Message) { + xxx_messageInfo_GatewayMetadataSignalQuality_Satellite.Merge(m, src) +} +func (m *GatewayMetadataSignalQuality_Satellite) XXX_Size() int { + return m.Size() +} +func (m *GatewayMetadataSignalQuality_Satellite) XXX_DiscardUnknown() { + xxx_messageInfo_GatewayMetadataSignalQuality_Satellite.DiscardUnknown(m) +} + +var xxx_messageInfo_GatewayMetadataSignalQuality_Satellite proto.InternalMessageInfo + +// Gateway metadata for localization. +type GatewayMetadataLocalization struct { + // Types that are valid to be assigned to Value: + // *GatewayMetadataLocalization_Terrestrial_ + // *GatewayMetadataLocalization_Satellite_ + Value isGatewayMetadataLocalization_Value `protobuf_oneof:"value"` +} + +func (m *GatewayMetadataLocalization) Reset() { *m = GatewayMetadataLocalization{} } +func (m *GatewayMetadataLocalization) String() string { return proto.CompactTextString(m) } +func (*GatewayMetadataLocalization) ProtoMessage() {} +func (*GatewayMetadataLocalization) Descriptor() ([]byte, []int) { + return fileDescriptor_6fdae513c2695c40, []int{4} +} +func (m *GatewayMetadataLocalization) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GatewayMetadataLocalization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GatewayMetadataLocalization.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GatewayMetadataLocalization) XXX_Merge(src proto.Message) { + xxx_messageInfo_GatewayMetadataLocalization.Merge(m, src) +} +func (m *GatewayMetadataLocalization) XXX_Size() int { + return m.Size() +} +func (m *GatewayMetadataLocalization) XXX_DiscardUnknown() { + xxx_messageInfo_GatewayMetadataLocalization.DiscardUnknown(m) +} + +var xxx_messageInfo_GatewayMetadataLocalization proto.InternalMessageInfo + +type isGatewayMetadataLocalization_Value interface { + isGatewayMetadataLocalization_Value() + MarshalTo([]byte) (int, error) + Size() int +} + +type GatewayMetadataLocalization_Terrestrial_ struct { + Terrestrial *GatewayMetadataLocalization_Terrestrial `protobuf:"bytes,1,opt,name=terrestrial,proto3,oneof" json:"terrestrial,omitempty"` +} +type GatewayMetadataLocalization_Satellite_ struct { + Satellite *GatewayMetadataLocalization_Satellite `protobuf:"bytes,2,opt,name=satellite,proto3,oneof" json:"satellite,omitempty"` +} + +func (*GatewayMetadataLocalization_Terrestrial_) isGatewayMetadataLocalization_Value() {} +func (*GatewayMetadataLocalization_Satellite_) isGatewayMetadataLocalization_Value() {} + +func (m *GatewayMetadataLocalization) GetValue() isGatewayMetadataLocalization_Value { + if m != nil { + return m.Value + } + return nil +} + +func (m *GatewayMetadataLocalization) GetTerrestrial() *GatewayMetadataLocalization_Terrestrial { + if x, ok := m.GetValue().(*GatewayMetadataLocalization_Terrestrial_); ok { + return x.Terrestrial + } + return nil +} + +func (m *GatewayMetadataLocalization) GetSatellite() *GatewayMetadataLocalization_Satellite { + if x, ok := m.GetValue().(*GatewayMetadataLocalization_Satellite_); ok { + return x.Satellite + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*GatewayMetadataLocalization) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*GatewayMetadataLocalization_Terrestrial_)(nil), + (*GatewayMetadataLocalization_Satellite_)(nil), + } +} + +type GatewayMetadataLocalization_Terrestrial struct { + Antennas []*GatewayMetadataLocalization_Terrestrial_Antenna `protobuf:"bytes,1,rep,name=antennas,proto3" json:"antennas,omitempty"` +} + +func (m *GatewayMetadataLocalization_Terrestrial) Reset() { + *m = GatewayMetadataLocalization_Terrestrial{} +} +func (m *GatewayMetadataLocalization_Terrestrial) String() string { return proto.CompactTextString(m) } +func (*GatewayMetadataLocalization_Terrestrial) ProtoMessage() {} +func (*GatewayMetadataLocalization_Terrestrial) Descriptor() ([]byte, []int) { + return fileDescriptor_6fdae513c2695c40, []int{4, 0} +} +func (m *GatewayMetadataLocalization_Terrestrial) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GatewayMetadataLocalization_Terrestrial) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GatewayMetadataLocalization_Terrestrial.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GatewayMetadataLocalization_Terrestrial) XXX_Merge(src proto.Message) { + xxx_messageInfo_GatewayMetadataLocalization_Terrestrial.Merge(m, src) +} +func (m *GatewayMetadataLocalization_Terrestrial) XXX_Size() int { + return m.Size() +} +func (m *GatewayMetadataLocalization_Terrestrial) XXX_DiscardUnknown() { + xxx_messageInfo_GatewayMetadataLocalization_Terrestrial.DiscardUnknown(m) +} + +var xxx_messageInfo_GatewayMetadataLocalization_Terrestrial proto.InternalMessageInfo + +func (m *GatewayMetadataLocalization_Terrestrial) GetAntennas() []*GatewayMetadataLocalization_Terrestrial_Antenna { + if m != nil { + return m.Antennas + } + return nil +} + +type GatewayMetadataLocalization_Terrestrial_Antenna struct { + Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` + // Location of the antenna. + Location *Location `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` + // Fine timestamp. + FineTimestamp *types.UInt64Value `protobuf:"bytes,3,opt,name=fine_timestamp,json=fineTimestamp,proto3" json:"fine_timestamp,omitempty"` + // Signal quality. + SignalQuality *TerrestrialGatewayAntennaSignalQuality `protobuf:"bytes,4,opt,name=signal_quality,json=signalQuality,proto3" json:"signal_quality,omitempty"` +} + +func (m *GatewayMetadataLocalization_Terrestrial_Antenna) Reset() { + *m = GatewayMetadataLocalization_Terrestrial_Antenna{} +} +func (m *GatewayMetadataLocalization_Terrestrial_Antenna) String() string { + return proto.CompactTextString(m) +} +func (*GatewayMetadataLocalization_Terrestrial_Antenna) ProtoMessage() {} +func (*GatewayMetadataLocalization_Terrestrial_Antenna) Descriptor() ([]byte, []int) { + return fileDescriptor_6fdae513c2695c40, []int{4, 0, 0} +} +func (m *GatewayMetadataLocalization_Terrestrial_Antenna) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GatewayMetadataLocalization_Terrestrial_Antenna) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GatewayMetadataLocalization_Terrestrial_Antenna.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GatewayMetadataLocalization_Terrestrial_Antenna) XXX_Merge(src proto.Message) { + xxx_messageInfo_GatewayMetadataLocalization_Terrestrial_Antenna.Merge(m, src) +} +func (m *GatewayMetadataLocalization_Terrestrial_Antenna) XXX_Size() int { + return m.Size() +} +func (m *GatewayMetadataLocalization_Terrestrial_Antenna) XXX_DiscardUnknown() { + xxx_messageInfo_GatewayMetadataLocalization_Terrestrial_Antenna.DiscardUnknown(m) +} + +var xxx_messageInfo_GatewayMetadataLocalization_Terrestrial_Antenna proto.InternalMessageInfo + +func (m *GatewayMetadataLocalization_Terrestrial_Antenna) GetIndex() uint32 { + if m != nil { + return m.Index + } + return 0 +} + +func (m *GatewayMetadataLocalization_Terrestrial_Antenna) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *GatewayMetadataLocalization_Terrestrial_Antenna) GetFineTimestamp() *types.UInt64Value { + if m != nil { + return m.FineTimestamp + } + return nil +} + +func (m *GatewayMetadataLocalization_Terrestrial_Antenna) GetSignalQuality() *TerrestrialGatewayAntennaSignalQuality { + if m != nil { + return m.SignalQuality + } + return nil +} + +type GatewayMetadataLocalization_Satellite struct { + // Satellite location. + Location *Location `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"` +} + +func (m *GatewayMetadataLocalization_Satellite) Reset() { *m = GatewayMetadataLocalization_Satellite{} } +func (m *GatewayMetadataLocalization_Satellite) String() string { return proto.CompactTextString(m) } +func (*GatewayMetadataLocalization_Satellite) ProtoMessage() {} +func (*GatewayMetadataLocalization_Satellite) Descriptor() ([]byte, []int) { + return fileDescriptor_6fdae513c2695c40, []int{4, 1} +} +func (m *GatewayMetadataLocalization_Satellite) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GatewayMetadataLocalization_Satellite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GatewayMetadataLocalization_Satellite.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GatewayMetadataLocalization_Satellite) XXX_Merge(src proto.Message) { + xxx_messageInfo_GatewayMetadataLocalization_Satellite.Merge(m, src) +} +func (m *GatewayMetadataLocalization_Satellite) XXX_Size() int { + return m.Size() +} +func (m *GatewayMetadataLocalization_Satellite) XXX_DiscardUnknown() { + xxx_messageInfo_GatewayMetadataLocalization_Satellite.DiscardUnknown(m) +} + +var xxx_messageInfo_GatewayMetadataLocalization_Satellite proto.InternalMessageInfo + +func (m *GatewayMetadataLocalization_Satellite) GetLocation() *Location { + if m != nil { + return m.Location + } + return nil +} + +// LoRaWAN uplink data message with encrypted PHYPayload and metadata. +type UplinkMessage struct { + // Key encryption keys with which data encryption keys are encrypted. + Keks map[string]*KeyPointer `protobuf:"bytes,1,rep,name=keks,proto3" json:"keks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Encrypted PHYPayload. + // Subscribing Home Networks receive this value if the Uplink Routing Policy has mac_data or application_data set, + // and if the PHYPayload passes the Routing Filter. + PhyPayload *UplinkMessage_EncryptedPHYPayload `protobuf:"bytes,2,opt,name=phy_payload,json=phyPayload,proto3" json:"phy_payload,omitempty"` + // Encrypted gateway metadata. + // Subscribing Home Networks receive this value if the Uplink Routing Policy has localization or signal_quality set, + // and if the message passes the Routing Filter. + GatewayMetadata *UplinkMessage_EncryptedGatewayMetadata `protobuf:"bytes,3,opt,name=gateway_metadata,json=gatewayMetadata,proto3" json:"gateway_metadata,omitempty"` + // Forwarder uplink token (optional). + // Subscribing Home Networks receive this value if the Uplink Routing Policy has allow_downlink set. + ForwarderUplinkToken []byte `protobuf:"bytes,4,opt,name=forwarder_uplink_token,json=forwarderUplinkToken,proto3" json:"forwarder_uplink_token,omitempty"` + // Gateway uplink token (optional). + // Subscribing Home Networks receive this value if the Uplink Routing Policy has allow_downlink set. + GatewayUplinkToken []byte `protobuf:"bytes,5,opt,name=gateway_uplink_token,json=gatewayUplinkToken,proto3" json:"gateway_uplink_token,omitempty"` + // Region of the gateway. + GatewayRegion Region `protobuf:"varint,6,opt,name=gateway_region,json=gatewayRegion,proto3,enum=org.packetbroker.v1alpha1.Region" json:"gateway_region,omitempty"` +} + +func (m *UplinkMessage) Reset() { *m = UplinkMessage{} } +func (m *UplinkMessage) String() string { return proto.CompactTextString(m) } +func (*UplinkMessage) ProtoMessage() {} +func (*UplinkMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_6fdae513c2695c40, []int{5} +} +func (m *UplinkMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UplinkMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UplinkMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *UplinkMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_UplinkMessage.Merge(m, src) +} +func (m *UplinkMessage) XXX_Size() int { + return m.Size() +} +func (m *UplinkMessage) XXX_DiscardUnknown() { + xxx_messageInfo_UplinkMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_UplinkMessage proto.InternalMessageInfo + +func (m *UplinkMessage) GetKeks() map[string]*KeyPointer { + if m != nil { + return m.Keks + } + return nil +} + +func (m *UplinkMessage) GetPhyPayload() *UplinkMessage_EncryptedPHYPayload { + if m != nil { + return m.PhyPayload + } + return nil +} + +func (m *UplinkMessage) GetGatewayMetadata() *UplinkMessage_EncryptedGatewayMetadata { + if m != nil { + return m.GatewayMetadata + } + return nil +} + +func (m *UplinkMessage) GetForwarderUplinkToken() []byte { + if m != nil { + return m.ForwarderUplinkToken + } + return nil +} + +func (m *UplinkMessage) GetGatewayUplinkToken() []byte { + if m != nil { + return m.GatewayUplinkToken + } + return nil +} + +func (m *UplinkMessage) GetGatewayRegion() Region { + if m != nil { + return m.GatewayRegion + } + return Region_UNKNOWN_REGION +} + +type UplinkMessage_EncryptedPHYPayload struct { + // Teaser of the PHYPayload. + Teaser *PHYPayloadTeaser `protobuf:"bytes,1,opt,name=teaser,proto3" json:"teaser,omitempty"` + // Encrypted PHYPayload. + Value *EncryptedData `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *UplinkMessage_EncryptedPHYPayload) Reset() { *m = UplinkMessage_EncryptedPHYPayload{} } +func (m *UplinkMessage_EncryptedPHYPayload) String() string { return proto.CompactTextString(m) } +func (*UplinkMessage_EncryptedPHYPayload) ProtoMessage() {} +func (*UplinkMessage_EncryptedPHYPayload) Descriptor() ([]byte, []int) { + return fileDescriptor_6fdae513c2695c40, []int{5, 1} +} +func (m *UplinkMessage_EncryptedPHYPayload) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UplinkMessage_EncryptedPHYPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UplinkMessage_EncryptedPHYPayload.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *UplinkMessage_EncryptedPHYPayload) XXX_Merge(src proto.Message) { + xxx_messageInfo_UplinkMessage_EncryptedPHYPayload.Merge(m, src) +} +func (m *UplinkMessage_EncryptedPHYPayload) XXX_Size() int { + return m.Size() +} +func (m *UplinkMessage_EncryptedPHYPayload) XXX_DiscardUnknown() { + xxx_messageInfo_UplinkMessage_EncryptedPHYPayload.DiscardUnknown(m) +} + +var xxx_messageInfo_UplinkMessage_EncryptedPHYPayload proto.InternalMessageInfo + +func (m *UplinkMessage_EncryptedPHYPayload) GetTeaser() *PHYPayloadTeaser { + if m != nil { + return m.Teaser + } + return nil +} + +func (m *UplinkMessage_EncryptedPHYPayload) GetValue() *EncryptedData { + if m != nil { + return m.Value + } + return nil +} + +type UplinkMessage_EncryptedGatewayMetadata struct { + // Teaser of the gateway metadata. + Teaser *GatewayMetadataTeaser `protobuf:"bytes,1,opt,name=teaser,proto3" json:"teaser,omitempty"` + // Encrypted GatewayMetadataSignalQuality message. + // Subscribing Home Networks receive this value if the Uplink Routing Policy has signal_quality set. + SignalQuality *EncryptedData `protobuf:"bytes,2,opt,name=signal_quality,json=signalQuality,proto3" json:"signal_quality,omitempty"` + // Encrypted GatewayMetadataLocalization message. + // Subscribing Home Networks receive this value if the Uplink Routing Policy has localization set. + Localization *EncryptedData `protobuf:"bytes,3,opt,name=localization,proto3" json:"localization,omitempty"` +} + +func (m *UplinkMessage_EncryptedGatewayMetadata) Reset() { + *m = UplinkMessage_EncryptedGatewayMetadata{} +} +func (m *UplinkMessage_EncryptedGatewayMetadata) String() string { return proto.CompactTextString(m) } +func (*UplinkMessage_EncryptedGatewayMetadata) ProtoMessage() {} +func (*UplinkMessage_EncryptedGatewayMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_6fdae513c2695c40, []int{5, 2} +} +func (m *UplinkMessage_EncryptedGatewayMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UplinkMessage_EncryptedGatewayMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UplinkMessage_EncryptedGatewayMetadata.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *UplinkMessage_EncryptedGatewayMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_UplinkMessage_EncryptedGatewayMetadata.Merge(m, src) +} +func (m *UplinkMessage_EncryptedGatewayMetadata) XXX_Size() int { + return m.Size() +} +func (m *UplinkMessage_EncryptedGatewayMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_UplinkMessage_EncryptedGatewayMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_UplinkMessage_EncryptedGatewayMetadata proto.InternalMessageInfo + +func (m *UplinkMessage_EncryptedGatewayMetadata) GetTeaser() *GatewayMetadataTeaser { + if m != nil { + return m.Teaser + } + return nil +} + +func (m *UplinkMessage_EncryptedGatewayMetadata) GetSignalQuality() *EncryptedData { + if m != nil { + return m.SignalQuality + } + return nil +} + +func (m *UplinkMessage_EncryptedGatewayMetadata) GetLocalization() *EncryptedData { + if m != nil { + return m.Localization + } + return nil +} + +// LoRaWAN downlink data message. +type DownlinkMessage struct { + // PHYPayload of the downlink message. + PhyPayload []byte `protobuf:"bytes,1,opt,name=phy_payload,json=phyPayload,proto3" json:"phy_payload,omitempty"` + // RX1 settings. + Rx1 *DownlinkMessage_RXSettings `protobuf:"bytes,2,opt,name=rx1,proto3" json:"rx1,omitempty"` + // RX2 settings. + Rx2 *DownlinkMessage_RXSettings `protobuf:"bytes,3,opt,name=rx2,proto3" json:"rx2,omitempty"` + // RX1 delay. + Rx1Delay *types.Duration `protobuf:"bytes,4,opt,name=rx1_delay,json=rx1Delay,proto3" json:"rx1_delay,omitempty"` + // Downlink message class. + Class DownlinkMessageClass `protobuf:"varint,5,opt,name=class,proto3,enum=org.packetbroker.v1alpha1.DownlinkMessageClass" json:"class,omitempty"` + // Forwarder uplink token, copied from UplinkMessage. + // If unset, gateway_uplink_token must be set. + ForwarderUplinkToken []byte `protobuf:"bytes,6,opt,name=forwarder_uplink_token,json=forwarderUplinkToken,proto3" json:"forwarder_uplink_token,omitempty"` + // Gateway uplink token, copied from UplinkMessage. + // If unset, forwarder_uplink_token must be set. + GatewayUplinkToken []byte `protobuf:"bytes,7,opt,name=gateway_uplink_token,json=gatewayUplinkToken,proto3" json:"gateway_uplink_token,omitempty"` + // Priority of the downlink message. + Priority DownlinkMessagePriority `protobuf:"varint,8,opt,name=priority,proto3,enum=org.packetbroker.v1alpha1.DownlinkMessagePriority" json:"priority,omitempty"` +} + +func (m *DownlinkMessage) Reset() { *m = DownlinkMessage{} } +func (m *DownlinkMessage) String() string { return proto.CompactTextString(m) } +func (*DownlinkMessage) ProtoMessage() {} +func (*DownlinkMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_6fdae513c2695c40, []int{6} +} +func (m *DownlinkMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DownlinkMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DownlinkMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DownlinkMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_DownlinkMessage.Merge(m, src) +} +func (m *DownlinkMessage) XXX_Size() int { + return m.Size() +} +func (m *DownlinkMessage) XXX_DiscardUnknown() { + xxx_messageInfo_DownlinkMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_DownlinkMessage proto.InternalMessageInfo + +func (m *DownlinkMessage) GetPhyPayload() []byte { + if m != nil { + return m.PhyPayload + } + return nil +} + +func (m *DownlinkMessage) GetRx1() *DownlinkMessage_RXSettings { + if m != nil { + return m.Rx1 + } + return nil +} + +func (m *DownlinkMessage) GetRx2() *DownlinkMessage_RXSettings { + if m != nil { + return m.Rx2 + } + return nil +} + +func (m *DownlinkMessage) GetRx1Delay() *types.Duration { + if m != nil { + return m.Rx1Delay + } + return nil +} + +func (m *DownlinkMessage) GetClass() DownlinkMessageClass { + if m != nil { + return m.Class + } + return DownlinkMessageClass_CLASS_A +} + +func (m *DownlinkMessage) GetForwarderUplinkToken() []byte { + if m != nil { + return m.ForwarderUplinkToken + } + return nil +} + +func (m *DownlinkMessage) GetGatewayUplinkToken() []byte { + if m != nil { + return m.GatewayUplinkToken + } + return nil +} + +func (m *DownlinkMessage) GetPriority() DownlinkMessagePriority { + if m != nil { + return m.Priority + } + return DownlinkMessagePriority_LOWEST +} + +type DownlinkMessage_RXSettings struct { + // Frequency (Hz). + Frequency uint64 `protobuf:"varint,1,opt,name=frequency,proto3" json:"frequency,omitempty"` + // Data rate index as defined in the gateway's LoRaWAN region. + DataRateIndex uint32 `protobuf:"varint,2,opt,name=data_rate_index,json=dataRateIndex,proto3" json:"data_rate_index,omitempty"` +} + +func (m *DownlinkMessage_RXSettings) Reset() { *m = DownlinkMessage_RXSettings{} } +func (m *DownlinkMessage_RXSettings) String() string { return proto.CompactTextString(m) } +func (*DownlinkMessage_RXSettings) ProtoMessage() {} +func (*DownlinkMessage_RXSettings) Descriptor() ([]byte, []int) { + return fileDescriptor_6fdae513c2695c40, []int{6, 0} +} +func (m *DownlinkMessage_RXSettings) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DownlinkMessage_RXSettings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DownlinkMessage_RXSettings.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DownlinkMessage_RXSettings) XXX_Merge(src proto.Message) { + xxx_messageInfo_DownlinkMessage_RXSettings.Merge(m, src) +} +func (m *DownlinkMessage_RXSettings) XXX_Size() int { + return m.Size() +} +func (m *DownlinkMessage_RXSettings) XXX_DiscardUnknown() { + xxx_messageInfo_DownlinkMessage_RXSettings.DiscardUnknown(m) +} + +var xxx_messageInfo_DownlinkMessage_RXSettings proto.InternalMessageInfo + +func (m *DownlinkMessage_RXSettings) GetFrequency() uint64 { + if m != nil { + return m.Frequency + } + return 0 +} + +func (m *DownlinkMessage_RXSettings) GetDataRateIndex() uint32 { + if m != nil { + return m.DataRateIndex + } + return 0 +} + +func init() { + proto.RegisterType((*PHYPayloadTeaser)(nil), "org.packetbroker.v1alpha1.PHYPayloadTeaser") + proto.RegisterType((*PHYPayloadTeaser_JoinRequestTeaser)(nil), "org.packetbroker.v1alpha1.PHYPayloadTeaser.JoinRequestTeaser") + proto.RegisterType((*PHYPayloadTeaser_MACPayloadTeaser)(nil), "org.packetbroker.v1alpha1.PHYPayloadTeaser.MACPayloadTeaser") + proto.RegisterType((*GatewayMetadataTeaser)(nil), "org.packetbroker.v1alpha1.GatewayMetadataTeaser") + proto.RegisterType((*GatewayMetadataTeaser_Terrestrial)(nil), "org.packetbroker.v1alpha1.GatewayMetadataTeaser.Terrestrial") + proto.RegisterType((*GatewayMetadataTeaser_Satellite)(nil), "org.packetbroker.v1alpha1.GatewayMetadataTeaser.Satellite") + proto.RegisterType((*TerrestrialGatewayAntennaSignalQuality)(nil), "org.packetbroker.v1alpha1.TerrestrialGatewayAntennaSignalQuality") + proto.RegisterType((*GatewayMetadataSignalQuality)(nil), "org.packetbroker.v1alpha1.GatewayMetadataSignalQuality") + proto.RegisterType((*GatewayMetadataSignalQuality_Terrestrial)(nil), "org.packetbroker.v1alpha1.GatewayMetadataSignalQuality.Terrestrial") + proto.RegisterType((*GatewayMetadataSignalQuality_Terrestrial_Antenna)(nil), "org.packetbroker.v1alpha1.GatewayMetadataSignalQuality.Terrestrial.Antenna") + proto.RegisterType((*GatewayMetadataSignalQuality_Satellite)(nil), "org.packetbroker.v1alpha1.GatewayMetadataSignalQuality.Satellite") + proto.RegisterType((*GatewayMetadataLocalization)(nil), "org.packetbroker.v1alpha1.GatewayMetadataLocalization") + proto.RegisterType((*GatewayMetadataLocalization_Terrestrial)(nil), "org.packetbroker.v1alpha1.GatewayMetadataLocalization.Terrestrial") + proto.RegisterType((*GatewayMetadataLocalization_Terrestrial_Antenna)(nil), "org.packetbroker.v1alpha1.GatewayMetadataLocalization.Terrestrial.Antenna") + proto.RegisterType((*GatewayMetadataLocalization_Satellite)(nil), "org.packetbroker.v1alpha1.GatewayMetadataLocalization.Satellite") + proto.RegisterType((*UplinkMessage)(nil), "org.packetbroker.v1alpha1.UplinkMessage") + proto.RegisterMapType((map[string]*KeyPointer)(nil), "org.packetbroker.v1alpha1.UplinkMessage.KeksEntry") + proto.RegisterType((*UplinkMessage_EncryptedPHYPayload)(nil), "org.packetbroker.v1alpha1.UplinkMessage.EncryptedPHYPayload") + proto.RegisterType((*UplinkMessage_EncryptedGatewayMetadata)(nil), "org.packetbroker.v1alpha1.UplinkMessage.EncryptedGatewayMetadata") + proto.RegisterType((*DownlinkMessage)(nil), "org.packetbroker.v1alpha1.DownlinkMessage") + proto.RegisterType((*DownlinkMessage_RXSettings)(nil), "org.packetbroker.v1alpha1.DownlinkMessage.RXSettings") +} + +func init() { + proto.RegisterFile("packetbroker/api/v1alpha1/messages.proto", fileDescriptor_6fdae513c2695c40) +} + +var fileDescriptor_6fdae513c2695c40 = []byte{ + // 1376 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x4b, 0x73, 0x1b, 0x45, + 0x10, 0xb6, 0xde, 0x52, 0xcb, 0xb2, 0xcd, 0x24, 0x21, 0x8a, 0x92, 0x12, 0x89, 0x21, 0x29, 0x53, + 0x80, 0x1c, 0x8b, 0x90, 0xa2, 0x92, 0xf0, 0xf0, 0x2b, 0x71, 0x12, 0x27, 0x31, 0x63, 0x87, 0x47, + 0xaa, 0x60, 0x33, 0xd6, 0xce, 0xae, 0x36, 0x5a, 0xcd, 0x6e, 0x66, 0x47, 0xb6, 0xc5, 0x95, 0x03, + 0x17, 0xaa, 0xe0, 0x0c, 0x27, 0xfe, 0x07, 0x3f, 0x20, 0x37, 0x72, 0x84, 0x1b, 0x95, 0xfc, 0x01, + 0xaa, 0xf8, 0x03, 0xd4, 0xcc, 0x8e, 0x1e, 0x2b, 0x59, 0x42, 0x36, 0xb9, 0xed, 0xf6, 0x74, 0x7f, + 0xd3, 0x3d, 0xdf, 0xd7, 0xbd, 0xb3, 0xb0, 0xe0, 0x93, 0x5a, 0x83, 0x8a, 0x5d, 0xee, 0x35, 0x28, + 0x5f, 0x24, 0xbe, 0xb3, 0xb8, 0xb7, 0x44, 0x5c, 0xbf, 0x4e, 0x96, 0x16, 0x9b, 0x34, 0x08, 0x88, + 0x4d, 0x83, 0x8a, 0xcf, 0x3d, 0xe1, 0xa1, 0x33, 0x1e, 0xb7, 0x2b, 0xfd, 0xde, 0x95, 0x8e, 0x67, + 0xa9, 0x6c, 0x7b, 0x9e, 0xed, 0xd2, 0x45, 0xe5, 0xb8, 0xdb, 0xb2, 0x16, 0xcd, 0x16, 0x27, 0xc2, + 0xf1, 0x58, 0x18, 0x3a, 0xbc, 0xbe, 0xcf, 0x89, 0xef, 0x53, 0xae, 0xa1, 0x4b, 0x17, 0x47, 0x27, + 0x41, 0x59, 0xab, 0xd9, 0x71, 0x7b, 0x6b, 0xb4, 0x5b, 0x83, 0xb6, 0x3b, 0x5e, 0x63, 0x2a, 0x72, + 0xbd, 0x5a, 0x5f, 0x5a, 0xf3, 0x3f, 0x24, 0x61, 0x6e, 0x6b, 0xe3, 0xab, 0x2d, 0xd2, 0x76, 0x3d, + 0x62, 0xee, 0x50, 0x12, 0x50, 0x8e, 0x10, 0x24, 0xeb, 0x24, 0xa8, 0x17, 0x63, 0xe7, 0x63, 0x0b, + 0xd3, 0x58, 0x3d, 0xa3, 0x5d, 0x98, 0x7e, 0xe2, 0x39, 0xcc, 0xe0, 0xf4, 0x69, 0x8b, 0x06, 0xa2, + 0x18, 0x3f, 0x1f, 0x5b, 0xc8, 0x57, 0x3f, 0xaa, 0x8c, 0x3c, 0x91, 0xca, 0x20, 0x6c, 0xe5, 0x8e, + 0xe7, 0x30, 0x1c, 0x86, 0x87, 0x96, 0x8d, 0x29, 0x9c, 0x7f, 0xd2, 0x33, 0xa2, 0x2d, 0x48, 0x34, + 0x49, 0xad, 0x98, 0x50, 0xd0, 0x37, 0x8e, 0x02, 0x7d, 0x6f, 0x79, 0x35, 0x62, 0xd8, 0x98, 0xc2, + 0x12, 0xaa, 0x64, 0xc2, 0x6b, 0x43, 0xbb, 0xa2, 0x33, 0x90, 0x55, 0xa5, 0xd0, 0x96, 0xa3, 0x4a, + 0x4c, 0xe3, 0x8c, 0x7c, 0x5f, 0x6f, 0x39, 0xe8, 0x34, 0x64, 0x4c, 0xba, 0xa7, 0x56, 0xe2, 0x6a, + 0x25, 0x6d, 0xd2, 0x3d, 0xb9, 0x70, 0x16, 0x72, 0x72, 0x81, 0x79, 0xac, 0x46, 0x55, 0x82, 0x05, + 0x9c, 0x35, 0xe9, 0xde, 0x7d, 0xf9, 0x5e, 0xfa, 0x2d, 0x06, 0x73, 0x83, 0x19, 0xa0, 0x73, 0x90, + 0xab, 0x79, 0xcc, 0x72, 0x78, 0x93, 0x9a, 0x0a, 0x2c, 0x8b, 0x7b, 0x06, 0x99, 0x83, 0xc4, 0x23, + 0xa6, 0xc9, 0x35, 0x9c, 0xdc, 0x78, 0xd9, 0x34, 0x39, 0x3a, 0x05, 0x69, 0xcb, 0xf0, 0x7c, 0x11, + 0x14, 0x93, 0x2a, 0x2a, 0x65, 0x3d, 0xf0, 0x45, 0x80, 0x4e, 0x40, 0xca, 0x32, 0x6a, 0x4c, 0x14, + 0x53, 0xca, 0x3d, 0x69, 0xad, 0x32, 0x11, 0xfa, 0xfa, 0x1e, 0x17, 0xc5, 0xb4, 0xb2, 0xa6, 0xac, + 0x2d, 0x8f, 0x0b, 0xf4, 0x2e, 0x20, 0x8b, 0x37, 0x0d, 0x3f, 0x4c, 0xc8, 0x70, 0x29, 0xb3, 0x45, + 0xbd, 0x98, 0x51, 0x2e, 0x73, 0x16, 0x6f, 0xea, 0x4c, 0x37, 0x95, 0x7d, 0x25, 0x07, 0x19, 0xed, + 0x39, 0xff, 0x6b, 0x1c, 0x4e, 0xdd, 0x22, 0x82, 0xee, 0x93, 0xf6, 0x3d, 0x2a, 0x88, 0x49, 0x04, + 0xd1, 0xe5, 0x3c, 0x86, 0xbc, 0xa0, 0x9c, 0xd3, 0x40, 0x70, 0x87, 0xb8, 0xea, 0xdc, 0xc6, 0x73, + 0x74, 0x28, 0x4c, 0x65, 0xa7, 0x87, 0x21, 0xd9, 0xef, 0x83, 0x44, 0x8f, 0x20, 0x17, 0x10, 0x41, + 0x5d, 0xd7, 0x11, 0x54, 0xcb, 0xeb, 0xda, 0x91, 0xf1, 0xb7, 0x3b, 0x08, 0x1b, 0x53, 0xb8, 0x07, + 0x57, 0xba, 0x02, 0xf9, 0xbe, 0x9d, 0xd1, 0x45, 0x98, 0xb1, 0x1c, 0x46, 0x0d, 0xe1, 0x34, 0x69, + 0x20, 0x48, 0xd3, 0xd7, 0x04, 0x15, 0xa4, 0x75, 0xa7, 0x63, 0x2c, 0xe5, 0x21, 0xd7, 0xc5, 0x5b, + 0xc9, 0x40, 0x6a, 0x8f, 0xb8, 0x2d, 0x3a, 0xff, 0x4b, 0x1c, 0x2e, 0xf5, 0x81, 0xe9, 0x3c, 0x96, + 0x99, 0xa0, 0x8c, 0x91, 0x6d, 0xc7, 0x66, 0xc4, 0xfd, 0xac, 0x45, 0x5c, 0x47, 0xb4, 0xd1, 0x05, + 0x98, 0xae, 0xd5, 0x09, 0x63, 0xd4, 0x35, 0x78, 0x10, 0x84, 0x6a, 0x8b, 0xe3, 0xbc, 0xb6, 0xe1, + 0x20, 0x70, 0xd0, 0x0d, 0xc8, 0x07, 0x2a, 0x26, 0xf4, 0x08, 0xeb, 0x3e, 0x5b, 0x09, 0xa7, 0x45, + 0xa5, 0x33, 0x2d, 0x2a, 0x37, 0x5d, 0x8f, 0x88, 0xcf, 0xe5, 0xfe, 0x18, 0x42, 0x7f, 0x15, 0xbd, + 0x0d, 0xa7, 0x65, 0x98, 0x11, 0x08, 0xc2, 0x4c, 0xc2, 0x4d, 0xc3, 0xa4, 0x7b, 0x8e, 0xea, 0x6f, + 0xdd, 0x45, 0x63, 0x91, 0x4e, 0xc9, 0xd8, 0x6d, 0x1d, 0xba, 0xd6, 0x89, 0x44, 0x73, 0x90, 0x08, + 0x18, 0x57, 0xea, 0x8b, 0x63, 0xf9, 0x88, 0xde, 0x86, 0x39, 0x4b, 0x35, 0x3e, 0xab, 0xb5, 0x0d, + 0xcf, 0xb2, 0x02, 0x1a, 0xca, 0x30, 0x81, 0x67, 0xbb, 0xf6, 0x07, 0xca, 0x3c, 0xff, 0x4f, 0x02, + 0xce, 0x0d, 0x50, 0x13, 0x3d, 0x13, 0xfb, 0x30, 0x21, 0xad, 0x4e, 0x4e, 0x74, 0x04, 0x6d, 0x9c, + 0x9e, 0xc8, 0xb0, 0x9e, 0x96, 0x8f, 0xbb, 0xcd, 0x08, 0x59, 0xfd, 0x1d, 0x8b, 0xea, 0xca, 0x86, + 0x2c, 0x09, 0x75, 0x10, 0x14, 0x63, 0xe7, 0x13, 0x0b, 0xf9, 0xea, 0xdd, 0x57, 0x50, 0x58, 0x45, + 0x6b, 0x0b, 0x77, 0xc1, 0x4b, 0x07, 0x90, 0xd1, 0x46, 0x74, 0x12, 0x52, 0x0e, 0x33, 0xe9, 0x81, + 0x3a, 0xc9, 0x02, 0x0e, 0x5f, 0xd0, 0x17, 0x5a, 0xad, 0x13, 0x14, 0x3e, 0x99, 0x96, 0x71, 0x88, + 0x37, 0xa2, 0x27, 0x9e, 0xa5, 0xe0, 0xec, 0x40, 0x39, 0x9b, 0x5e, 0x8d, 0xb8, 0xce, 0xb7, 0xa1, + 0xa4, 0xac, 0xc3, 0x48, 0x5f, 0x99, 0xfc, 0x6c, 0xfa, 0xc1, 0xc6, 0x71, 0xfe, 0x78, 0x98, 0xf3, + 0x4f, 0x8f, 0xb9, 0xcb, 0x08, 0xca, 0xbf, 0x4f, 0x44, 0x29, 0xb7, 0x86, 0x28, 0xbf, 0xf3, 0xff, + 0xcb, 0x3a, 0x84, 0xf1, 0x1f, 0xe3, 0xff, 0x45, 0xf9, 0x27, 0x90, 0xed, 0x7c, 0xdc, 0x75, 0xe9, + 0x6f, 0x8e, 0xc9, 0x64, 0x53, 0xbb, 0xe2, 0x6e, 0x10, 0x5a, 0x1d, 0x9a, 0x8a, 0xe1, 0x0c, 0x39, + 0x37, 0x34, 0x43, 0x1e, 0xde, 0x66, 0xe2, 0xea, 0x95, 0x70, 0x88, 0x44, 0x67, 0x26, 0xaa, 0xc3, + 0x8c, 0x9e, 0x67, 0x4f, 0x43, 0xe1, 0xa8, 0x39, 0xf2, 0x4a, 0x14, 0x58, 0x08, 0xfa, 0x5f, 0x4b, + 0x9b, 0x7d, 0x4a, 0x8c, 0x14, 0x1f, 0x3b, 0x46, 0xf1, 0x3d, 0x29, 0xff, 0x99, 0x81, 0xc2, 0x43, + 0xdf, 0x75, 0x58, 0xe3, 0x5e, 0x78, 0xf9, 0x43, 0x37, 0x21, 0xd9, 0xa0, 0x8d, 0x0e, 0xbd, 0xd5, + 0x31, 0xb8, 0x91, 0xb8, 0xca, 0x5d, 0xda, 0x08, 0xd6, 0x99, 0xe0, 0x6d, 0xac, 0xe2, 0xd1, 0xd7, + 0x90, 0xf7, 0xeb, 0xed, 0xce, 0x57, 0x59, 0x73, 0x74, 0x63, 0x62, 0xb8, 0x75, 0x56, 0xe3, 0x6d, + 0x5f, 0x50, 0xb3, 0x77, 0xfb, 0xc1, 0xe0, 0xd7, 0xdb, 0xfa, 0x19, 0xb9, 0x30, 0x67, 0x87, 0xa7, + 0x67, 0x34, 0xb5, 0xbe, 0x34, 0x81, 0xcb, 0x47, 0xdf, 0x63, 0x40, 0xa8, 0x78, 0xd6, 0x8e, 0x1a, + 0xd0, 0x15, 0x78, 0xdd, 0xf2, 0xf8, 0x3e, 0xe1, 0x26, 0xe5, 0x46, 0x4b, 0x81, 0x18, 0xc2, 0x6b, + 0x50, 0xa6, 0xf8, 0x9e, 0xc6, 0x27, 0xbb, 0xab, 0xe1, 0x0e, 0x3b, 0x72, 0x0d, 0x5d, 0x86, 0x93, + 0x9d, 0x1c, 0x23, 0x31, 0x29, 0x15, 0x83, 0xf4, 0x5a, 0x7f, 0xc4, 0x06, 0xcc, 0x74, 0x22, 0x38, + 0xb5, 0x25, 0xbd, 0xf2, 0xa6, 0x33, 0x53, 0xbd, 0x30, 0xa6, 0x26, 0xac, 0x1c, 0x71, 0x41, 0x07, + 0x86, 0xaf, 0xa5, 0x6f, 0x20, 0xd7, 0x65, 0x44, 0x7e, 0xe3, 0x1a, 0xb4, 0xad, 0xa4, 0x92, 0xc3, + 0xf2, 0x11, 0x5d, 0x8f, 0x4e, 0xcc, 0x8b, 0x63, 0xf0, 0xef, 0xd2, 0xf6, 0x96, 0xe7, 0x30, 0x41, + 0xb9, 0x9e, 0x8a, 0xd7, 0xe2, 0x1f, 0xc6, 0x4a, 0x3f, 0xc7, 0xe0, 0xc4, 0x21, 0x1c, 0xa1, 0x55, + 0x48, 0x0b, 0x75, 0x39, 0xd1, 0xc2, 0x7c, 0xe7, 0x08, 0x17, 0x5b, 0xac, 0x43, 0xd1, 0xc7, 0xd1, + 0xec, 0x16, 0xc6, 0x60, 0x74, 0x73, 0x58, 0x93, 0xc4, 0xe9, 0xb1, 0xfd, 0x5d, 0x1c, 0x8a, 0xa3, + 0xc8, 0x45, 0x1b, 0x03, 0x19, 0x5e, 0x3e, 0xea, 0xb5, 0xab, 0x9b, 0xe6, 0x83, 0xa1, 0xee, 0x3f, + 0x6a, 0xbe, 0xd1, 0x26, 0x47, 0x9b, 0x30, 0xed, 0xf6, 0x0d, 0x49, 0x2d, 0xe8, 0xc9, 0xe1, 0x22, + 0xd1, 0xf3, 0xbf, 0x27, 0x61, 0x76, 0xcd, 0xdb, 0x67, 0xfd, 0xdd, 0xfd, 0x46, 0xb4, 0x2b, 0xc3, + 0x7f, 0x9e, 0xfe, 0xbe, 0xba, 0x05, 0x09, 0x7e, 0xb0, 0xa4, 0x0b, 0xf9, 0x60, 0xcc, 0xce, 0x03, + 0xc8, 0x15, 0xfc, 0xe5, 0x36, 0x15, 0xc2, 0x61, 0x76, 0x80, 0x25, 0x42, 0x08, 0x54, 0xd5, 0x25, + 0x1c, 0x1f, 0xa8, 0x8a, 0xae, 0x42, 0x8e, 0x1f, 0x2c, 0x19, 0x26, 0x75, 0x49, 0x67, 0xbc, 0x9e, + 0x19, 0x9a, 0xd1, 0x6b, 0xfa, 0xff, 0x13, 0x67, 0xf9, 0xc1, 0xd2, 0x9a, 0x74, 0x45, 0xeb, 0x90, + 0xaa, 0xb9, 0x24, 0x08, 0x54, 0xbb, 0xcd, 0x54, 0x17, 0x27, 0x4f, 0x61, 0x55, 0x86, 0xe1, 0x30, + 0x7a, 0x4c, 0xeb, 0xa7, 0x8f, 0xd1, 0xfa, 0x99, 0x91, 0xad, 0x7f, 0x1f, 0xb2, 0x3e, 0x77, 0x3c, + 0x2e, 0x65, 0x94, 0x55, 0x19, 0x57, 0x27, 0xcf, 0x78, 0x4b, 0x47, 0xe2, 0x2e, 0x46, 0x09, 0x03, + 0xf4, 0x4e, 0x52, 0xfe, 0x9f, 0x75, 0xef, 0xae, 0x8a, 0xf5, 0x24, 0xee, 0x19, 0xd0, 0x25, 0x98, + 0x95, 0xf2, 0x36, 0x38, 0x11, 0xd4, 0x08, 0x3f, 0xb6, 0x71, 0xf5, 0xb1, 0x2d, 0xa8, 0x71, 0x48, + 0x04, 0xbd, 0x2d, 0x8d, 0x2b, 0xb7, 0x9e, 0xbd, 0x28, 0xc7, 0x9e, 0xbf, 0x28, 0xc7, 0xfe, 0x7a, + 0x51, 0x8e, 0xfd, 0xf4, 0xb2, 0x3c, 0xf5, 0xfc, 0x65, 0x79, 0xea, 0x8f, 0x97, 0xe5, 0xa9, 0x47, + 0xef, 0xd9, 0x5e, 0x34, 0x53, 0x8f, 0xdb, 0x91, 0x5f, 0xf1, 0xeb, 0xfd, 0xab, 0xbb, 0x69, 0x45, + 0xdc, 0xfb, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x9f, 0x5c, 0xc7, 0x8d, 0x10, 0x00, 0x00, +} + +func (m *PHYPayloadTeaser) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PHYPayloadTeaser) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PHYPayloadTeaser) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Payload != nil { + { + size := m.Payload.Size() + i -= size + if _, err := m.Payload.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintMessages(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PHYPayloadTeaser_JoinRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PHYPayloadTeaser_JoinRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.JoinRequest != nil { + { + size, err := m.JoinRequest.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *PHYPayloadTeaser_Mac) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PHYPayloadTeaser_Mac) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Mac != nil { + { + size, err := m.Mac.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *PHYPayloadTeaser_JoinRequestTeaser) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PHYPayloadTeaser_JoinRequestTeaser) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PHYPayloadTeaser_JoinRequestTeaser) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.DevNonce != 0 { + i = encodeVarintMessages(dAtA, i, uint64(m.DevNonce)) + i-- + dAtA[i] = 0x18 + } + if m.DevEui != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.DevEui)) + i-- + dAtA[i] = 0x11 + } + if m.JoinEui != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.JoinEui)) + i-- + dAtA[i] = 0x9 + } + return len(dAtA) - i, nil +} + +func (m *PHYPayloadTeaser_MACPayloadTeaser) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PHYPayloadTeaser_MACPayloadTeaser) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PHYPayloadTeaser_MACPayloadTeaser) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.FrmPayloadLength != 0 { + i = encodeVarintMessages(dAtA, i, uint64(m.FrmPayloadLength)) + i-- + dAtA[i] = 0x38 + } + if m.FPort != 0 { + i = encodeVarintMessages(dAtA, i, uint64(m.FPort)) + i-- + dAtA[i] = 0x30 + } + if m.FCnt != 0 { + i = encodeVarintMessages(dAtA, i, uint64(m.FCnt)) + i-- + dAtA[i] = 0x28 + } + if m.FOpts { + i-- + if m.FOpts { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.DevAddr != 0 { + i = encodeVarintMessages(dAtA, i, uint64(m.DevAddr)) + i-- + dAtA[i] = 0x18 + } + if m.Confirmed { + i-- + if m.Confirmed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + return len(dAtA) - i, nil +} + +func (m *GatewayMetadataTeaser) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GatewayMetadataTeaser) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GatewayMetadataTeaser) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Value != nil { + { + size := m.Value.Size() + i -= size + if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *GatewayMetadataTeaser_Terrestrial_) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GatewayMetadataTeaser_Terrestrial_) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Terrestrial != nil { + { + size, err := m.Terrestrial.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *GatewayMetadataTeaser_Satellite_) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GatewayMetadataTeaser_Satellite_) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Satellite != nil { + { + size, err := m.Satellite.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *GatewayMetadataTeaser_Terrestrial) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GatewayMetadataTeaser_Terrestrial) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GatewayMetadataTeaser_Terrestrial) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.FineTimestamp { + i-- + if m.FineTimestamp { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + return len(dAtA) - i, nil +} + +func (m *GatewayMetadataTeaser_Satellite) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GatewayMetadataTeaser_Satellite) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GatewayMetadataTeaser_Satellite) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *TerrestrialGatewayAntennaSignalQuality) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TerrestrialGatewayAntennaSignalQuality) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TerrestrialGatewayAntennaSignalQuality) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.FrequencyOffset != 0 { + i = encodeVarintMessages(dAtA, i, uint64(m.FrequencyOffset)) + i-- + dAtA[i] = 0x28 + } + if m.Snr != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Snr)))) + i-- + dAtA[i] = 0x25 + } + if m.RssiStandardDeviation != nil { + { + size, err := m.RssiStandardDeviation.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.SignalRssi != nil { + { + size, err := m.SignalRssi.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.ChannelRssi != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.ChannelRssi)))) + i-- + dAtA[i] = 0xd + } + return len(dAtA) - i, nil +} + +func (m *GatewayMetadataSignalQuality) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GatewayMetadataSignalQuality) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GatewayMetadataSignalQuality) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Value != nil { + { + size := m.Value.Size() + i -= size + if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *GatewayMetadataSignalQuality_Terrestrial_) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GatewayMetadataSignalQuality_Terrestrial_) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Terrestrial != nil { + { + size, err := m.Terrestrial.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *GatewayMetadataSignalQuality_Satellite_) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GatewayMetadataSignalQuality_Satellite_) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Satellite != nil { + { + size, err := m.Satellite.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *GatewayMetadataSignalQuality_Terrestrial) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GatewayMetadataSignalQuality_Terrestrial) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GatewayMetadataSignalQuality_Terrestrial) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Antennas) > 0 { + for iNdEx := len(m.Antennas) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Antennas[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GatewayMetadataSignalQuality_Terrestrial_Antenna) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GatewayMetadataSignalQuality_Terrestrial_Antenna) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GatewayMetadataSignalQuality_Terrestrial_Antenna) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Value != nil { + { + size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Index != 0 { + i = encodeVarintMessages(dAtA, i, uint64(m.Index)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GatewayMetadataSignalQuality_Satellite) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GatewayMetadataSignalQuality_Satellite) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GatewayMetadataSignalQuality_Satellite) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *GatewayMetadataLocalization) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GatewayMetadataLocalization) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GatewayMetadataLocalization) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Value != nil { + { + size := m.Value.Size() + i -= size + if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *GatewayMetadataLocalization_Terrestrial_) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GatewayMetadataLocalization_Terrestrial_) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Terrestrial != nil { + { + size, err := m.Terrestrial.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *GatewayMetadataLocalization_Satellite_) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GatewayMetadataLocalization_Satellite_) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Satellite != nil { + { + size, err := m.Satellite.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *GatewayMetadataLocalization_Terrestrial) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GatewayMetadataLocalization_Terrestrial) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GatewayMetadataLocalization_Terrestrial) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Antennas) > 0 { + for iNdEx := len(m.Antennas) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Antennas[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *GatewayMetadataLocalization_Terrestrial_Antenna) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GatewayMetadataLocalization_Terrestrial_Antenna) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GatewayMetadataLocalization_Terrestrial_Antenna) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SignalQuality != nil { + { + size, err := m.SignalQuality.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.FineTimestamp != nil { + { + size, err := m.FineTimestamp.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Location != nil { + { + size, err := m.Location.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Index != 0 { + i = encodeVarintMessages(dAtA, i, uint64(m.Index)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GatewayMetadataLocalization_Satellite) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GatewayMetadataLocalization_Satellite) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GatewayMetadataLocalization_Satellite) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Location != nil { + { + size, err := m.Location.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UplinkMessage) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UplinkMessage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UplinkMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GatewayRegion != 0 { + i = encodeVarintMessages(dAtA, i, uint64(m.GatewayRegion)) + i-- + dAtA[i] = 0x30 + } + if len(m.GatewayUplinkToken) > 0 { + i -= len(m.GatewayUplinkToken) + copy(dAtA[i:], m.GatewayUplinkToken) + i = encodeVarintMessages(dAtA, i, uint64(len(m.GatewayUplinkToken))) + i-- + dAtA[i] = 0x2a + } + if len(m.ForwarderUplinkToken) > 0 { + i -= len(m.ForwarderUplinkToken) + copy(dAtA[i:], m.ForwarderUplinkToken) + i = encodeVarintMessages(dAtA, i, uint64(len(m.ForwarderUplinkToken))) + i-- + dAtA[i] = 0x22 + } + if m.GatewayMetadata != nil { + { + size, err := m.GatewayMetadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.PhyPayload != nil { + { + size, err := m.PhyPayload.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Keks) > 0 { + for k := range m.Keks { + v := m.Keks[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintMessages(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintMessages(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *UplinkMessage_EncryptedPHYPayload) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UplinkMessage_EncryptedPHYPayload) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UplinkMessage_EncryptedPHYPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Value != nil { + { + size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Teaser != nil { + { + size, err := m.Teaser.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UplinkMessage_EncryptedGatewayMetadata) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UplinkMessage_EncryptedGatewayMetadata) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UplinkMessage_EncryptedGatewayMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Localization != nil { + { + size, err := m.Localization.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.SignalQuality != nil { + { + size, err := m.SignalQuality.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Teaser != nil { + { + size, err := m.Teaser.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DownlinkMessage) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DownlinkMessage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DownlinkMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Priority != 0 { + i = encodeVarintMessages(dAtA, i, uint64(m.Priority)) + i-- + dAtA[i] = 0x40 + } + if len(m.GatewayUplinkToken) > 0 { + i -= len(m.GatewayUplinkToken) + copy(dAtA[i:], m.GatewayUplinkToken) + i = encodeVarintMessages(dAtA, i, uint64(len(m.GatewayUplinkToken))) + i-- + dAtA[i] = 0x3a + } + if len(m.ForwarderUplinkToken) > 0 { + i -= len(m.ForwarderUplinkToken) + copy(dAtA[i:], m.ForwarderUplinkToken) + i = encodeVarintMessages(dAtA, i, uint64(len(m.ForwarderUplinkToken))) + i-- + dAtA[i] = 0x32 + } + if m.Class != 0 { + i = encodeVarintMessages(dAtA, i, uint64(m.Class)) + i-- + dAtA[i] = 0x28 + } + if m.Rx1Delay != nil { + { + size, err := m.Rx1Delay.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.Rx2 != nil { + { + size, err := m.Rx2.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Rx1 != nil { + { + size, err := m.Rx1.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintMessages(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.PhyPayload) > 0 { + i -= len(m.PhyPayload) + copy(dAtA[i:], m.PhyPayload) + i = encodeVarintMessages(dAtA, i, uint64(len(m.PhyPayload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DownlinkMessage_RXSettings) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DownlinkMessage_RXSettings) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DownlinkMessage_RXSettings) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.DataRateIndex != 0 { + i = encodeVarintMessages(dAtA, i, uint64(m.DataRateIndex)) + i-- + dAtA[i] = 0x10 + } + if m.Frequency != 0 { + i = encodeVarintMessages(dAtA, i, uint64(m.Frequency)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintMessages(dAtA []byte, offset int, v uint64) int { + offset -= sovMessages(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *PHYPayloadTeaser) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovMessages(uint64(l)) + } + if m.Payload != nil { + n += m.Payload.Size() + } + return n +} + +func (m *PHYPayloadTeaser_JoinRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.JoinRequest != nil { + l = m.JoinRequest.Size() + n += 1 + l + sovMessages(uint64(l)) + } + return n +} +func (m *PHYPayloadTeaser_Mac) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Mac != nil { + l = m.Mac.Size() + n += 1 + l + sovMessages(uint64(l)) + } + return n +} +func (m *PHYPayloadTeaser_JoinRequestTeaser) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.JoinEui != 0 { + n += 9 + } + if m.DevEui != 0 { + n += 9 + } + if m.DevNonce != 0 { + n += 1 + sovMessages(uint64(m.DevNonce)) + } + return n +} + +func (m *PHYPayloadTeaser_MACPayloadTeaser) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Confirmed { + n += 2 + } + if m.DevAddr != 0 { + n += 1 + sovMessages(uint64(m.DevAddr)) + } + if m.FOpts { + n += 2 + } + if m.FCnt != 0 { + n += 1 + sovMessages(uint64(m.FCnt)) + } + if m.FPort != 0 { + n += 1 + sovMessages(uint64(m.FPort)) + } + if m.FrmPayloadLength != 0 { + n += 1 + sovMessages(uint64(m.FrmPayloadLength)) + } + return n +} + +func (m *GatewayMetadataTeaser) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != nil { + n += m.Value.Size() + } + return n +} + +func (m *GatewayMetadataTeaser_Terrestrial_) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Terrestrial != nil { + l = m.Terrestrial.Size() + n += 1 + l + sovMessages(uint64(l)) + } + return n +} +func (m *GatewayMetadataTeaser_Satellite_) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Satellite != nil { + l = m.Satellite.Size() + n += 1 + l + sovMessages(uint64(l)) + } + return n +} +func (m *GatewayMetadataTeaser_Terrestrial) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FineTimestamp { + n += 2 + } + return n +} + +func (m *GatewayMetadataTeaser_Satellite) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *TerrestrialGatewayAntennaSignalQuality) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ChannelRssi != 0 { + n += 5 + } + if m.SignalRssi != nil { + l = m.SignalRssi.Size() + n += 1 + l + sovMessages(uint64(l)) + } + if m.RssiStandardDeviation != nil { + l = m.RssiStandardDeviation.Size() + n += 1 + l + sovMessages(uint64(l)) + } + if m.Snr != 0 { + n += 5 + } + if m.FrequencyOffset != 0 { + n += 1 + sovMessages(uint64(m.FrequencyOffset)) + } + return n +} + +func (m *GatewayMetadataSignalQuality) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != nil { + n += m.Value.Size() + } + return n +} + +func (m *GatewayMetadataSignalQuality_Terrestrial_) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Terrestrial != nil { + l = m.Terrestrial.Size() + n += 1 + l + sovMessages(uint64(l)) + } + return n +} +func (m *GatewayMetadataSignalQuality_Satellite_) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Satellite != nil { + l = m.Satellite.Size() + n += 1 + l + sovMessages(uint64(l)) + } + return n +} +func (m *GatewayMetadataSignalQuality_Terrestrial) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Antennas) > 0 { + for _, e := range m.Antennas { + l = e.Size() + n += 1 + l + sovMessages(uint64(l)) + } + } + return n +} + +func (m *GatewayMetadataSignalQuality_Terrestrial_Antenna) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Index != 0 { + n += 1 + sovMessages(uint64(m.Index)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovMessages(uint64(l)) + } + return n +} + +func (m *GatewayMetadataSignalQuality_Satellite) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *GatewayMetadataLocalization) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != nil { + n += m.Value.Size() + } + return n +} + +func (m *GatewayMetadataLocalization_Terrestrial_) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Terrestrial != nil { + l = m.Terrestrial.Size() + n += 1 + l + sovMessages(uint64(l)) + } + return n +} +func (m *GatewayMetadataLocalization_Satellite_) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Satellite != nil { + l = m.Satellite.Size() + n += 1 + l + sovMessages(uint64(l)) + } + return n +} +func (m *GatewayMetadataLocalization_Terrestrial) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Antennas) > 0 { + for _, e := range m.Antennas { + l = e.Size() + n += 1 + l + sovMessages(uint64(l)) + } + } + return n +} + +func (m *GatewayMetadataLocalization_Terrestrial_Antenna) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Index != 0 { + n += 1 + sovMessages(uint64(m.Index)) + } + if m.Location != nil { + l = m.Location.Size() + n += 1 + l + sovMessages(uint64(l)) + } + if m.FineTimestamp != nil { + l = m.FineTimestamp.Size() + n += 1 + l + sovMessages(uint64(l)) + } + if m.SignalQuality != nil { + l = m.SignalQuality.Size() + n += 1 + l + sovMessages(uint64(l)) + } + return n +} + +func (m *GatewayMetadataLocalization_Satellite) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Location != nil { + l = m.Location.Size() + n += 1 + l + sovMessages(uint64(l)) + } + return n +} + +func (m *UplinkMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Keks) > 0 { + for k, v := range m.Keks { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMessages(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMessages(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMessages(uint64(mapEntrySize)) + } + } + if m.PhyPayload != nil { + l = m.PhyPayload.Size() + n += 1 + l + sovMessages(uint64(l)) + } + if m.GatewayMetadata != nil { + l = m.GatewayMetadata.Size() + n += 1 + l + sovMessages(uint64(l)) + } + l = len(m.ForwarderUplinkToken) + if l > 0 { + n += 1 + l + sovMessages(uint64(l)) + } + l = len(m.GatewayUplinkToken) + if l > 0 { + n += 1 + l + sovMessages(uint64(l)) + } + if m.GatewayRegion != 0 { + n += 1 + sovMessages(uint64(m.GatewayRegion)) + } + return n +} + +func (m *UplinkMessage_EncryptedPHYPayload) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Teaser != nil { + l = m.Teaser.Size() + n += 1 + l + sovMessages(uint64(l)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovMessages(uint64(l)) + } + return n +} + +func (m *UplinkMessage_EncryptedGatewayMetadata) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Teaser != nil { + l = m.Teaser.Size() + n += 1 + l + sovMessages(uint64(l)) + } + if m.SignalQuality != nil { + l = m.SignalQuality.Size() + n += 1 + l + sovMessages(uint64(l)) + } + if m.Localization != nil { + l = m.Localization.Size() + n += 1 + l + sovMessages(uint64(l)) + } + return n +} + +func (m *DownlinkMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PhyPayload) + if l > 0 { + n += 1 + l + sovMessages(uint64(l)) + } + if m.Rx1 != nil { + l = m.Rx1.Size() + n += 1 + l + sovMessages(uint64(l)) + } + if m.Rx2 != nil { + l = m.Rx2.Size() + n += 1 + l + sovMessages(uint64(l)) + } + if m.Rx1Delay != nil { + l = m.Rx1Delay.Size() + n += 1 + l + sovMessages(uint64(l)) + } + if m.Class != 0 { + n += 1 + sovMessages(uint64(m.Class)) + } + l = len(m.ForwarderUplinkToken) + if l > 0 { + n += 1 + l + sovMessages(uint64(l)) + } + l = len(m.GatewayUplinkToken) + if l > 0 { + n += 1 + l + sovMessages(uint64(l)) + } + if m.Priority != 0 { + n += 1 + sovMessages(uint64(m.Priority)) + } + return n +} + +func (m *DownlinkMessage_RXSettings) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Frequency != 0 { + n += 1 + sovMessages(uint64(m.Frequency)) + } + if m.DataRateIndex != 0 { + n += 1 + sovMessages(uint64(m.DataRateIndex)) + } + return n +} + +func sovMessages(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMessages(x uint64) (n int) { + return sovMessages(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *PHYPayloadTeaser) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PHYPayloadTeaser: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PHYPayloadTeaser: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JoinRequest", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &PHYPayloadTeaser_JoinRequestTeaser{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Payload = &PHYPayloadTeaser_JoinRequest{v} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mac", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &PHYPayloadTeaser_MACPayloadTeaser{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Payload = &PHYPayloadTeaser_Mac{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PHYPayloadTeaser_JoinRequestTeaser) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: JoinRequestTeaser: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: JoinRequestTeaser: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field JoinEui", wireType) + } + m.JoinEui = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.JoinEui = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field DevEui", wireType) + } + m.DevEui = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.DevEui = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DevNonce", wireType) + } + m.DevNonce = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DevNonce |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PHYPayloadTeaser_MACPayloadTeaser) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MACPayloadTeaser: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MACPayloadTeaser: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Confirmed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Confirmed = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DevAddr", wireType) + } + m.DevAddr = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DevAddr |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FOpts", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.FOpts = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FCnt", wireType) + } + m.FCnt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FCnt |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FPort", wireType) + } + m.FPort = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FPort |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FrmPayloadLength", wireType) + } + m.FrmPayloadLength = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FrmPayloadLength |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GatewayMetadataTeaser) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GatewayMetadataTeaser: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GatewayMetadataTeaser: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Terrestrial", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &GatewayMetadataTeaser_Terrestrial{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &GatewayMetadataTeaser_Terrestrial_{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Satellite", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &GatewayMetadataTeaser_Satellite{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &GatewayMetadataTeaser_Satellite_{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GatewayMetadataTeaser_Terrestrial) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Terrestrial: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Terrestrial: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FineTimestamp", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.FineTimestamp = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GatewayMetadataTeaser_Satellite) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Satellite: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Satellite: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TerrestrialGatewayAntennaSignalQuality) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TerrestrialGatewayAntennaSignalQuality: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TerrestrialGatewayAntennaSignalQuality: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelRssi", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.ChannelRssi = float32(math.Float32frombits(v)) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignalRssi", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SignalRssi == nil { + m.SignalRssi = &types.FloatValue{} + } + if err := m.SignalRssi.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RssiStandardDeviation", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RssiStandardDeviation == nil { + m.RssiStandardDeviation = &types.FloatValue{} + } + if err := m.RssiStandardDeviation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Snr", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Snr = float32(math.Float32frombits(v)) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FrequencyOffset", wireType) + } + m.FrequencyOffset = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FrequencyOffset |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GatewayMetadataSignalQuality) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GatewayMetadataSignalQuality: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GatewayMetadataSignalQuality: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Terrestrial", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &GatewayMetadataSignalQuality_Terrestrial{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &GatewayMetadataSignalQuality_Terrestrial_{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Satellite", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &GatewayMetadataSignalQuality_Satellite{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &GatewayMetadataSignalQuality_Satellite_{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GatewayMetadataSignalQuality_Terrestrial) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Terrestrial: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Terrestrial: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Antennas", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Antennas = append(m.Antennas, &GatewayMetadataSignalQuality_Terrestrial_Antenna{}) + if err := m.Antennas[len(m.Antennas)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GatewayMetadataSignalQuality_Terrestrial_Antenna) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Antenna: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Antenna: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + } + m.Index = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Index |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Value == nil { + m.Value = &TerrestrialGatewayAntennaSignalQuality{} + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GatewayMetadataSignalQuality_Satellite) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Satellite: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Satellite: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GatewayMetadataLocalization) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GatewayMetadataLocalization: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GatewayMetadataLocalization: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Terrestrial", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &GatewayMetadataLocalization_Terrestrial{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &GatewayMetadataLocalization_Terrestrial_{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Satellite", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &GatewayMetadataLocalization_Satellite{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Value = &GatewayMetadataLocalization_Satellite_{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GatewayMetadataLocalization_Terrestrial) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Terrestrial: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Terrestrial: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Antennas", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Antennas = append(m.Antennas, &GatewayMetadataLocalization_Terrestrial_Antenna{}) + if err := m.Antennas[len(m.Antennas)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GatewayMetadataLocalization_Terrestrial_Antenna) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Antenna: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Antenna: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + } + m.Index = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Index |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Location == nil { + m.Location = &Location{} + } + if err := m.Location.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FineTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FineTimestamp == nil { + m.FineTimestamp = &types.UInt64Value{} + } + if err := m.FineTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignalQuality", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SignalQuality == nil { + m.SignalQuality = &TerrestrialGatewayAntennaSignalQuality{} + } + if err := m.SignalQuality.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GatewayMetadataLocalization_Satellite) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Satellite: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Satellite: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Location == nil { + m.Location = &Location{} + } + if err := m.Location.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UplinkMessage) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UplinkMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UplinkMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Keks == nil { + m.Keks = make(map[string]*KeyPointer) + } + var mapkey string + var mapvalue *KeyPointer + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMessages + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthMessages + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthMessages + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthMessages + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &KeyPointer{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Keks[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PhyPayload", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PhyPayload == nil { + m.PhyPayload = &UplinkMessage_EncryptedPHYPayload{} + } + if err := m.PhyPayload.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GatewayMetadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GatewayMetadata == nil { + m.GatewayMetadata = &UplinkMessage_EncryptedGatewayMetadata{} + } + if err := m.GatewayMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderUplinkToken", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForwarderUplinkToken = append(m.ForwarderUplinkToken[:0], dAtA[iNdEx:postIndex]...) + if m.ForwarderUplinkToken == nil { + m.ForwarderUplinkToken = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GatewayUplinkToken", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GatewayUplinkToken = append(m.GatewayUplinkToken[:0], dAtA[iNdEx:postIndex]...) + if m.GatewayUplinkToken == nil { + m.GatewayUplinkToken = []byte{} + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GatewayRegion", wireType) + } + m.GatewayRegion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GatewayRegion |= Region(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UplinkMessage_EncryptedPHYPayload) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EncryptedPHYPayload: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EncryptedPHYPayload: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Teaser", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Teaser == nil { + m.Teaser = &PHYPayloadTeaser{} + } + if err := m.Teaser.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Value == nil { + m.Value = &EncryptedData{} + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UplinkMessage_EncryptedGatewayMetadata) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EncryptedGatewayMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EncryptedGatewayMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Teaser", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Teaser == nil { + m.Teaser = &GatewayMetadataTeaser{} + } + if err := m.Teaser.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignalQuality", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SignalQuality == nil { + m.SignalQuality = &EncryptedData{} + } + if err := m.SignalQuality.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Localization", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Localization == nil { + m.Localization = &EncryptedData{} + } + if err := m.Localization.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DownlinkMessage) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DownlinkMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DownlinkMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PhyPayload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PhyPayload = append(m.PhyPayload[:0], dAtA[iNdEx:postIndex]...) + if m.PhyPayload == nil { + m.PhyPayload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rx1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Rx1 == nil { + m.Rx1 = &DownlinkMessage_RXSettings{} + } + if err := m.Rx1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rx2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Rx2 == nil { + m.Rx2 = &DownlinkMessage_RXSettings{} + } + if err := m.Rx2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rx1Delay", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Rx1Delay == nil { + m.Rx1Delay = &types.Duration{} + } + if err := m.Rx1Delay.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Class", wireType) + } + m.Class = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Class |= DownlinkMessageClass(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderUplinkToken", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForwarderUplinkToken = append(m.ForwarderUplinkToken[:0], dAtA[iNdEx:postIndex]...) + if m.ForwarderUplinkToken == nil { + m.ForwarderUplinkToken = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GatewayUplinkToken", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMessages + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthMessages + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GatewayUplinkToken = append(m.GatewayUplinkToken[:0], dAtA[iNdEx:postIndex]...) + if m.GatewayUplinkToken == nil { + m.GatewayUplinkToken = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) + } + m.Priority = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Priority |= DownlinkMessagePriority(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DownlinkMessage_RXSettings) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RXSettings: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RXSettings: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Frequency", wireType) + } + m.Frequency = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Frequency |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DataRateIndex", wireType) + } + m.DataRateIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMessages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DataRateIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMessages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthMessages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMessages(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMessages + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMessages + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMessages + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthMessages + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMessages + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMessages + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMessages = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMessages = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMessages = fmt.Errorf("proto: unexpected end of group") +) diff --git a/v1alpha1/packetbroker.pb.go b/v1alpha1/packetbroker.pb.go new file mode 100644 index 0000000..1e0a938 --- /dev/null +++ b/v1alpha1/packetbroker.pb.go @@ -0,0 +1,37 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: packetbroker/api/v1alpha1/packetbroker.proto + +package packetbroker + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +func init() { + proto.RegisterFile("packetbroker/api/v1alpha1/packetbroker.proto", fileDescriptor_759c7fb470f3419f) +} + +var fileDescriptor_759c7fb470f3419f = []byte{ + // 117 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x29, 0x48, 0x4c, 0xce, + 0x4e, 0x2d, 0x49, 0x2a, 0xca, 0xcf, 0x4e, 0x2d, 0xd2, 0x4f, 0x2c, 0xc8, 0xd4, 0x2f, 0x33, 0x4c, + 0xcc, 0x29, 0xc8, 0x48, 0x34, 0xd4, 0x47, 0x96, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, + 0xcc, 0x2f, 0x4a, 0xd7, 0x43, 0x11, 0x87, 0xa9, 0x76, 0x72, 0x3f, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, + 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, + 0xc6, 0x63, 0x39, 0x86, 0x28, 0xdd, 0xf4, 0x7c, 0x54, 0x3d, 0xf9, 0x45, 0xe9, 0x28, 0x36, 0x59, + 0x23, 0xcb, 0x26, 0xb1, 0x81, 0xad, 0x32, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xde, 0x42, 0xe9, + 0x91, 0x9a, 0x00, 0x00, 0x00, +} diff --git a/v1alpha1/routing.pb.go b/v1alpha1/routing.pb.go new file mode 100644 index 0000000..cc8fa88 --- /dev/null +++ b/v1alpha1/routing.pb.go @@ -0,0 +1,4160 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: packetbroker/api/v1alpha1/routing.proto + +package packetbroker + +import ( + encoding_binary "encoding/binary" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + types "github.com/gogo/protobuf/types" + io "io" + math "math" + math_bits "math/bits" +) + +// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Routing policy between a Forwarder and a Home Network. +type RoutingPolicy struct { + // Uplink policy. + Uplink *RoutingPolicy_Uplink `protobuf:"bytes,1,opt,name=uplink,proto3" json:"uplink,omitempty"` + // Downlink policy. + Downlink *RoutingPolicy_Downlink `protobuf:"bytes,2,opt,name=downlink,proto3" json:"downlink,omitempty"` +} + +func (m *RoutingPolicy) Reset() { *m = RoutingPolicy{} } +func (m *RoutingPolicy) String() string { return proto.CompactTextString(m) } +func (*RoutingPolicy) ProtoMessage() {} +func (*RoutingPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_dcf6e9916911dcb7, []int{0} +} +func (m *RoutingPolicy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RoutingPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RoutingPolicy.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RoutingPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_RoutingPolicy.Merge(m, src) +} +func (m *RoutingPolicy) XXX_Size() int { + return m.Size() +} +func (m *RoutingPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_RoutingPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_RoutingPolicy proto.InternalMessageInfo + +func (m *RoutingPolicy) GetUplink() *RoutingPolicy_Uplink { + if m != nil { + return m.Uplink + } + return nil +} + +func (m *RoutingPolicy) GetDownlink() *RoutingPolicy_Downlink { + if m != nil { + return m.Downlink + } + return nil +} + +type RoutingPolicy_Uplink struct { + // Forward join-request messages. + JoinRequest bool `protobuf:"varint,1,opt,name=join_request,json=joinRequest,proto3" json:"join_request,omitempty"` + // Forward uplink messages with FPort of 0. + MacData bool `protobuf:"varint,2,opt,name=mac_data,json=macData,proto3" json:"mac_data,omitempty"` + // Forward uplink messages with FPort between 1 and 255. + ApplicationData bool `protobuf:"varint,3,opt,name=application_data,json=applicationData,proto3" json:"application_data,omitempty"` + // Forward RSSI and SNR. + SignalQuality bool `protobuf:"varint,4,opt,name=signal_quality,json=signalQuality,proto3" json:"signal_quality,omitempty"` + // Forward gateway location, RSSI, SNR and fine timestamp. + Localization bool `protobuf:"varint,5,opt,name=localization,proto3" json:"localization,omitempty"` + // Forward uplink token to enable downlink. + AllowDownlink bool `protobuf:"varint,6,opt,name=allow_downlink,json=allowDownlink,proto3" json:"allow_downlink,omitempty"` +} + +func (m *RoutingPolicy_Uplink) Reset() { *m = RoutingPolicy_Uplink{} } +func (m *RoutingPolicy_Uplink) String() string { return proto.CompactTextString(m) } +func (*RoutingPolicy_Uplink) ProtoMessage() {} +func (*RoutingPolicy_Uplink) Descriptor() ([]byte, []int) { + return fileDescriptor_dcf6e9916911dcb7, []int{0, 0} +} +func (m *RoutingPolicy_Uplink) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RoutingPolicy_Uplink) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RoutingPolicy_Uplink.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RoutingPolicy_Uplink) XXX_Merge(src proto.Message) { + xxx_messageInfo_RoutingPolicy_Uplink.Merge(m, src) +} +func (m *RoutingPolicy_Uplink) XXX_Size() int { + return m.Size() +} +func (m *RoutingPolicy_Uplink) XXX_DiscardUnknown() { + xxx_messageInfo_RoutingPolicy_Uplink.DiscardUnknown(m) +} + +var xxx_messageInfo_RoutingPolicy_Uplink proto.InternalMessageInfo + +func (m *RoutingPolicy_Uplink) GetJoinRequest() bool { + if m != nil { + return m.JoinRequest + } + return false +} + +func (m *RoutingPolicy_Uplink) GetMacData() bool { + if m != nil { + return m.MacData + } + return false +} + +func (m *RoutingPolicy_Uplink) GetApplicationData() bool { + if m != nil { + return m.ApplicationData + } + return false +} + +func (m *RoutingPolicy_Uplink) GetSignalQuality() bool { + if m != nil { + return m.SignalQuality + } + return false +} + +func (m *RoutingPolicy_Uplink) GetLocalization() bool { + if m != nil { + return m.Localization + } + return false +} + +func (m *RoutingPolicy_Uplink) GetAllowDownlink() bool { + if m != nil { + return m.AllowDownlink + } + return false +} + +type RoutingPolicy_Downlink struct { + // Allow join-accept messages. + JoinAccept bool `protobuf:"varint,1,opt,name=join_accept,json=joinAccept,proto3" json:"join_accept,omitempty"` + // Allow downlink messages with FPort of 0. + MacData bool `protobuf:"varint,2,opt,name=mac_data,json=macData,proto3" json:"mac_data,omitempty"` + // Allow downlink messages with FPort between 1 and 255. + ApplicationData bool `protobuf:"varint,3,opt,name=application_data,json=applicationData,proto3" json:"application_data,omitempty"` +} + +func (m *RoutingPolicy_Downlink) Reset() { *m = RoutingPolicy_Downlink{} } +func (m *RoutingPolicy_Downlink) String() string { return proto.CompactTextString(m) } +func (*RoutingPolicy_Downlink) ProtoMessage() {} +func (*RoutingPolicy_Downlink) Descriptor() ([]byte, []int) { + return fileDescriptor_dcf6e9916911dcb7, []int{0, 1} +} +func (m *RoutingPolicy_Downlink) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RoutingPolicy_Downlink) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RoutingPolicy_Downlink.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RoutingPolicy_Downlink) XXX_Merge(src proto.Message) { + xxx_messageInfo_RoutingPolicy_Downlink.Merge(m, src) +} +func (m *RoutingPolicy_Downlink) XXX_Size() int { + return m.Size() +} +func (m *RoutingPolicy_Downlink) XXX_DiscardUnknown() { + xxx_messageInfo_RoutingPolicy_Downlink.DiscardUnknown(m) +} + +var xxx_messageInfo_RoutingPolicy_Downlink proto.InternalMessageInfo + +func (m *RoutingPolicy_Downlink) GetJoinAccept() bool { + if m != nil { + return m.JoinAccept + } + return false +} + +func (m *RoutingPolicy_Downlink) GetMacData() bool { + if m != nil { + return m.MacData + } + return false +} + +func (m *RoutingPolicy_Downlink) GetApplicationData() bool { + if m != nil { + return m.ApplicationData + } + return false +} + +// Filter for Home Networks to subscribe to forwarded messages. +type RoutingFilter struct { + // Pass Forwarders. If empty, pass all Forwarders. + Forwarders []*RoutingFilter_Forwarder `protobuf:"bytes,1,rep,name=forwarders,proto3" json:"forwarders,omitempty"` + // Types that are valid to be assigned to Message: + // *RoutingFilter_JoinRequest_ + // *RoutingFilter_Mac + Message isRoutingFilter_Message `protobuf_oneof:"message"` + // Pass gateway metadata. If not set, pass gateway metadata if available. + GatewayMetadata *types.BoolValue `protobuf:"bytes,4,opt,name=gateway_metadata,json=gatewayMetadata,proto3" json:"gateway_metadata,omitempty"` +} + +func (m *RoutingFilter) Reset() { *m = RoutingFilter{} } +func (m *RoutingFilter) String() string { return proto.CompactTextString(m) } +func (*RoutingFilter) ProtoMessage() {} +func (*RoutingFilter) Descriptor() ([]byte, []int) { + return fileDescriptor_dcf6e9916911dcb7, []int{1} +} +func (m *RoutingFilter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RoutingFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RoutingFilter.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RoutingFilter) XXX_Merge(src proto.Message) { + xxx_messageInfo_RoutingFilter.Merge(m, src) +} +func (m *RoutingFilter) XXX_Size() int { + return m.Size() +} +func (m *RoutingFilter) XXX_DiscardUnknown() { + xxx_messageInfo_RoutingFilter.DiscardUnknown(m) +} + +var xxx_messageInfo_RoutingFilter proto.InternalMessageInfo + +type isRoutingFilter_Message interface { + isRoutingFilter_Message() + MarshalTo([]byte) (int, error) + Size() int +} + +type RoutingFilter_JoinRequest_ struct { + JoinRequest *RoutingFilter_JoinRequest `protobuf:"bytes,2,opt,name=join_request,json=joinRequest,proto3,oneof" json:"join_request,omitempty"` +} +type RoutingFilter_Mac struct { + Mac *RoutingFilter_MACPayload `protobuf:"bytes,3,opt,name=mac,proto3,oneof" json:"mac,omitempty"` +} + +func (*RoutingFilter_JoinRequest_) isRoutingFilter_Message() {} +func (*RoutingFilter_Mac) isRoutingFilter_Message() {} + +func (m *RoutingFilter) GetMessage() isRoutingFilter_Message { + if m != nil { + return m.Message + } + return nil +} + +func (m *RoutingFilter) GetForwarders() []*RoutingFilter_Forwarder { + if m != nil { + return m.Forwarders + } + return nil +} + +func (m *RoutingFilter) GetJoinRequest() *RoutingFilter_JoinRequest { + if x, ok := m.GetMessage().(*RoutingFilter_JoinRequest_); ok { + return x.JoinRequest + } + return nil +} + +func (m *RoutingFilter) GetMac() *RoutingFilter_MACPayload { + if x, ok := m.GetMessage().(*RoutingFilter_Mac); ok { + return x.Mac + } + return nil +} + +func (m *RoutingFilter) GetGatewayMetadata() *types.BoolValue { + if m != nil { + return m.GatewayMetadata + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*RoutingFilter) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*RoutingFilter_JoinRequest_)(nil), + (*RoutingFilter_Mac)(nil), + } +} + +type RoutingFilter_Forwarder struct { + // LoRa Alliance NetID of the Forwarder Member. + NetId uint32 `protobuf:"varint,1,opt,name=net_id,json=netId,proto3" json:"net_id,omitempty"` + // Allowed Forwarder IDs. If empty, allow all Forwarder IDs. + // Forwarder IDs are assigned by the Member. + ForwarderIds []string `protobuf:"bytes,2,rep,name=forwarder_ids,json=forwarderIds,proto3" json:"forwarder_ids,omitempty"` +} + +func (m *RoutingFilter_Forwarder) Reset() { *m = RoutingFilter_Forwarder{} } +func (m *RoutingFilter_Forwarder) String() string { return proto.CompactTextString(m) } +func (*RoutingFilter_Forwarder) ProtoMessage() {} +func (*RoutingFilter_Forwarder) Descriptor() ([]byte, []int) { + return fileDescriptor_dcf6e9916911dcb7, []int{1, 0} +} +func (m *RoutingFilter_Forwarder) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RoutingFilter_Forwarder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RoutingFilter_Forwarder.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RoutingFilter_Forwarder) XXX_Merge(src proto.Message) { + xxx_messageInfo_RoutingFilter_Forwarder.Merge(m, src) +} +func (m *RoutingFilter_Forwarder) XXX_Size() int { + return m.Size() +} +func (m *RoutingFilter_Forwarder) XXX_DiscardUnknown() { + xxx_messageInfo_RoutingFilter_Forwarder.DiscardUnknown(m) +} + +var xxx_messageInfo_RoutingFilter_Forwarder proto.InternalMessageInfo + +func (m *RoutingFilter_Forwarder) GetNetId() uint32 { + if m != nil { + return m.NetId + } + return 0 +} + +func (m *RoutingFilter_Forwarder) GetForwarderIds() []string { + if m != nil { + return m.ForwarderIds + } + return nil +} + +type RoutingFilter_JoinRequest struct { + // Pass join-request EUIs by prefix. If empty, allow all join-requests. + EuiPrefixes []*RoutingFilter_JoinRequest_EUIPrefixes `protobuf:"bytes,1,rep,name=eui_prefixes,json=euiPrefixes,proto3" json:"eui_prefixes,omitempty"` +} + +func (m *RoutingFilter_JoinRequest) Reset() { *m = RoutingFilter_JoinRequest{} } +func (m *RoutingFilter_JoinRequest) String() string { return proto.CompactTextString(m) } +func (*RoutingFilter_JoinRequest) ProtoMessage() {} +func (*RoutingFilter_JoinRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_dcf6e9916911dcb7, []int{1, 1} +} +func (m *RoutingFilter_JoinRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RoutingFilter_JoinRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RoutingFilter_JoinRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RoutingFilter_JoinRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RoutingFilter_JoinRequest.Merge(m, src) +} +func (m *RoutingFilter_JoinRequest) XXX_Size() int { + return m.Size() +} +func (m *RoutingFilter_JoinRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RoutingFilter_JoinRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RoutingFilter_JoinRequest proto.InternalMessageInfo + +func (m *RoutingFilter_JoinRequest) GetEuiPrefixes() []*RoutingFilter_JoinRequest_EUIPrefixes { + if m != nil { + return m.EuiPrefixes + } + return nil +} + +type RoutingFilter_JoinRequest_EUIPrefixes struct { + JoinEui uint64 `protobuf:"fixed64,1,opt,name=join_eui,json=joinEui,proto3" json:"join_eui,omitempty"` + // Significant bits of join_eui. + JoinEuiLength uint32 `protobuf:"varint,2,opt,name=join_eui_length,json=joinEuiLength,proto3" json:"join_eui_length,omitempty"` + DevEui uint64 `protobuf:"fixed64,3,opt,name=dev_eui,json=devEui,proto3" json:"dev_eui,omitempty"` + // Significant bits of dev_eui. + DevEuiLength uint32 `protobuf:"varint,4,opt,name=dev_eui_length,json=devEuiLength,proto3" json:"dev_eui_length,omitempty"` +} + +func (m *RoutingFilter_JoinRequest_EUIPrefixes) Reset() { *m = RoutingFilter_JoinRequest_EUIPrefixes{} } +func (m *RoutingFilter_JoinRequest_EUIPrefixes) String() string { return proto.CompactTextString(m) } +func (*RoutingFilter_JoinRequest_EUIPrefixes) ProtoMessage() {} +func (*RoutingFilter_JoinRequest_EUIPrefixes) Descriptor() ([]byte, []int) { + return fileDescriptor_dcf6e9916911dcb7, []int{1, 1, 0} +} +func (m *RoutingFilter_JoinRequest_EUIPrefixes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RoutingFilter_JoinRequest_EUIPrefixes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RoutingFilter_JoinRequest_EUIPrefixes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RoutingFilter_JoinRequest_EUIPrefixes) XXX_Merge(src proto.Message) { + xxx_messageInfo_RoutingFilter_JoinRequest_EUIPrefixes.Merge(m, src) +} +func (m *RoutingFilter_JoinRequest_EUIPrefixes) XXX_Size() int { + return m.Size() +} +func (m *RoutingFilter_JoinRequest_EUIPrefixes) XXX_DiscardUnknown() { + xxx_messageInfo_RoutingFilter_JoinRequest_EUIPrefixes.DiscardUnknown(m) +} + +var xxx_messageInfo_RoutingFilter_JoinRequest_EUIPrefixes proto.InternalMessageInfo + +func (m *RoutingFilter_JoinRequest_EUIPrefixes) GetJoinEui() uint64 { + if m != nil { + return m.JoinEui + } + return 0 +} + +func (m *RoutingFilter_JoinRequest_EUIPrefixes) GetJoinEuiLength() uint32 { + if m != nil { + return m.JoinEuiLength + } + return 0 +} + +func (m *RoutingFilter_JoinRequest_EUIPrefixes) GetDevEui() uint64 { + if m != nil { + return m.DevEui + } + return 0 +} + +func (m *RoutingFilter_JoinRequest_EUIPrefixes) GetDevEuiLength() uint32 { + if m != nil { + return m.DevEuiLength + } + return 0 +} + +type RoutingFilter_MACPayload struct { + // Pass (un)confirmed uplink data messages. + Confirmed *types.BoolValue `protobuf:"bytes,1,opt,name=confirmed,proto3" json:"confirmed,omitempty"` + // Pass DevAddrs by prefix. If empty, allow all DevAddrs. + DevAddrPrefixes []*RoutingFilter_MACPayload_DevAddrPrefix `protobuf:"bytes,2,rep,name=dev_addr_prefixes,json=devAddrPrefixes,proto3" json:"dev_addr_prefixes,omitempty"` + // Pass messages with or without FOpts. + FOpts *types.BoolValue `protobuf:"bytes,3,opt,name=f_opts,json=fOpts,proto3" json:"f_opts,omitempty"` + // Pass for FPort ranges. If empty, allow all FPorts. + FPortRanges []*RoutingFilter_MACPayload_FPortRange `protobuf:"bytes,4,rep,name=f_port_ranges,json=fPortRanges,proto3" json:"f_port_ranges,omitempty"` +} + +func (m *RoutingFilter_MACPayload) Reset() { *m = RoutingFilter_MACPayload{} } +func (m *RoutingFilter_MACPayload) String() string { return proto.CompactTextString(m) } +func (*RoutingFilter_MACPayload) ProtoMessage() {} +func (*RoutingFilter_MACPayload) Descriptor() ([]byte, []int) { + return fileDescriptor_dcf6e9916911dcb7, []int{1, 2} +} +func (m *RoutingFilter_MACPayload) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RoutingFilter_MACPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RoutingFilter_MACPayload.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RoutingFilter_MACPayload) XXX_Merge(src proto.Message) { + xxx_messageInfo_RoutingFilter_MACPayload.Merge(m, src) +} +func (m *RoutingFilter_MACPayload) XXX_Size() int { + return m.Size() +} +func (m *RoutingFilter_MACPayload) XXX_DiscardUnknown() { + xxx_messageInfo_RoutingFilter_MACPayload.DiscardUnknown(m) +} + +var xxx_messageInfo_RoutingFilter_MACPayload proto.InternalMessageInfo + +func (m *RoutingFilter_MACPayload) GetConfirmed() *types.BoolValue { + if m != nil { + return m.Confirmed + } + return nil +} + +func (m *RoutingFilter_MACPayload) GetDevAddrPrefixes() []*RoutingFilter_MACPayload_DevAddrPrefix { + if m != nil { + return m.DevAddrPrefixes + } + return nil +} + +func (m *RoutingFilter_MACPayload) GetFOpts() *types.BoolValue { + if m != nil { + return m.FOpts + } + return nil +} + +func (m *RoutingFilter_MACPayload) GetFPortRanges() []*RoutingFilter_MACPayload_FPortRange { + if m != nil { + return m.FPortRanges + } + return nil +} + +type RoutingFilter_MACPayload_DevAddrPrefix struct { + Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + // Significant bits of value. + Length uint32 `protobuf:"varint,2,opt,name=length,proto3" json:"length,omitempty"` +} + +func (m *RoutingFilter_MACPayload_DevAddrPrefix) Reset() { + *m = RoutingFilter_MACPayload_DevAddrPrefix{} +} +func (m *RoutingFilter_MACPayload_DevAddrPrefix) String() string { return proto.CompactTextString(m) } +func (*RoutingFilter_MACPayload_DevAddrPrefix) ProtoMessage() {} +func (*RoutingFilter_MACPayload_DevAddrPrefix) Descriptor() ([]byte, []int) { + return fileDescriptor_dcf6e9916911dcb7, []int{1, 2, 0} +} +func (m *RoutingFilter_MACPayload_DevAddrPrefix) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RoutingFilter_MACPayload_DevAddrPrefix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RoutingFilter_MACPayload_DevAddrPrefix.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RoutingFilter_MACPayload_DevAddrPrefix) XXX_Merge(src proto.Message) { + xxx_messageInfo_RoutingFilter_MACPayload_DevAddrPrefix.Merge(m, src) +} +func (m *RoutingFilter_MACPayload_DevAddrPrefix) XXX_Size() int { + return m.Size() +} +func (m *RoutingFilter_MACPayload_DevAddrPrefix) XXX_DiscardUnknown() { + xxx_messageInfo_RoutingFilter_MACPayload_DevAddrPrefix.DiscardUnknown(m) +} + +var xxx_messageInfo_RoutingFilter_MACPayload_DevAddrPrefix proto.InternalMessageInfo + +func (m *RoutingFilter_MACPayload_DevAddrPrefix) GetValue() uint32 { + if m != nil { + return m.Value + } + return 0 +} + +func (m *RoutingFilter_MACPayload_DevAddrPrefix) GetLength() uint32 { + if m != nil { + return m.Length + } + return 0 +} + +type RoutingFilter_MACPayload_FPortRange struct { + // Inclusive start value of the range. + Low uint32 `protobuf:"varint,1,opt,name=low,proto3" json:"low,omitempty"` + // Inclusive end value of the range. + High uint32 `protobuf:"varint,2,opt,name=high,proto3" json:"high,omitempty"` +} + +func (m *RoutingFilter_MACPayload_FPortRange) Reset() { *m = RoutingFilter_MACPayload_FPortRange{} } +func (m *RoutingFilter_MACPayload_FPortRange) String() string { return proto.CompactTextString(m) } +func (*RoutingFilter_MACPayload_FPortRange) ProtoMessage() {} +func (*RoutingFilter_MACPayload_FPortRange) Descriptor() ([]byte, []int) { + return fileDescriptor_dcf6e9916911dcb7, []int{1, 2, 1} +} +func (m *RoutingFilter_MACPayload_FPortRange) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RoutingFilter_MACPayload_FPortRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RoutingFilter_MACPayload_FPortRange.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RoutingFilter_MACPayload_FPortRange) XXX_Merge(src proto.Message) { + xxx_messageInfo_RoutingFilter_MACPayload_FPortRange.Merge(m, src) +} +func (m *RoutingFilter_MACPayload_FPortRange) XXX_Size() int { + return m.Size() +} +func (m *RoutingFilter_MACPayload_FPortRange) XXX_DiscardUnknown() { + xxx_messageInfo_RoutingFilter_MACPayload_FPortRange.DiscardUnknown(m) +} + +var xxx_messageInfo_RoutingFilter_MACPayload_FPortRange proto.InternalMessageInfo + +func (m *RoutingFilter_MACPayload_FPortRange) GetLow() uint32 { + if m != nil { + return m.Low + } + return 0 +} + +func (m *RoutingFilter_MACPayload_FPortRange) GetHigh() uint32 { + if m != nil { + return m.High + } + return 0 +} + +type RouteHop struct { + // Time when the server received the message. + ReceivedAt *types.Timestamp `protobuf:"bytes,1,opt,name=received_at,json=receivedAt,proto3" json:"received_at,omitempty"` + // Sender of the message, typically the authorized client identifier. + SenderName string `protobuf:"bytes,2,opt,name=sender_name,json=senderName,proto3" json:"sender_name,omitempty"` + // Sender IP address or host name. + SenderAddress string `protobuf:"bytes,3,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // Receiver of the message. + ReceiverName string `protobuf:"bytes,4,opt,name=receiver_name,json=receiverName,proto3" json:"receiver_name,omitempty"` + // Receiver agent. + ReceiverAgent string `protobuf:"bytes,5,opt,name=receiver_agent,json=receiverAgent,proto3" json:"receiver_agent,omitempty"` +} + +func (m *RouteHop) Reset() { *m = RouteHop{} } +func (m *RouteHop) String() string { return proto.CompactTextString(m) } +func (*RouteHop) ProtoMessage() {} +func (*RouteHop) Descriptor() ([]byte, []int) { + return fileDescriptor_dcf6e9916911dcb7, []int{2} +} +func (m *RouteHop) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RouteHop) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RouteHop.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RouteHop) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteHop.Merge(m, src) +} +func (m *RouteHop) XXX_Size() int { + return m.Size() +} +func (m *RouteHop) XXX_DiscardUnknown() { + xxx_messageInfo_RouteHop.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteHop proto.InternalMessageInfo + +func (m *RouteHop) GetReceivedAt() *types.Timestamp { + if m != nil { + return m.ReceivedAt + } + return nil +} + +func (m *RouteHop) GetSenderName() string { + if m != nil { + return m.SenderName + } + return "" +} + +func (m *RouteHop) GetSenderAddress() string { + if m != nil { + return m.SenderAddress + } + return "" +} + +func (m *RouteHop) GetReceiverName() string { + if m != nil { + return m.ReceiverName + } + return "" +} + +func (m *RouteHop) GetReceiverAgent() string { + if m != nil { + return m.ReceiverAgent + } + return "" +} + +// Uplink message routed from a Forwarder to a Home Network. +type RoutedUplinkMessage struct { + // Message identifier generated by the Router. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // LoRa Alliance NetID of the Forwarder Member. + ForwarderNetId uint32 `protobuf:"varint,2,opt,name=forwarder_net_id,json=forwarderNetId,proto3" json:"forwarder_net_id,omitempty"` + // Forwarder identifier issued by the Forwarder Member. + ForwarderId string `protobuf:"bytes,3,opt,name=forwarder_id,json=forwarderId,proto3" json:"forwarder_id,omitempty"` + // LoRa Alliance NetID of the Home Network Member. + HomeNetworkNetId uint32 `protobuf:"varint,4,opt,name=home_network_net_id,json=homeNetworkNetId,proto3" json:"home_network_net_id,omitempty"` + // Uplink message. + Message *UplinkMessage `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"` + // Hops that the message passed. Each Router appends an entry. + Hops []*RouteHop `protobuf:"bytes,6,rep,name=hops,proto3" json:"hops,omitempty"` +} + +func (m *RoutedUplinkMessage) Reset() { *m = RoutedUplinkMessage{} } +func (m *RoutedUplinkMessage) String() string { return proto.CompactTextString(m) } +func (*RoutedUplinkMessage) ProtoMessage() {} +func (*RoutedUplinkMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_dcf6e9916911dcb7, []int{3} +} +func (m *RoutedUplinkMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RoutedUplinkMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RoutedUplinkMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RoutedUplinkMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_RoutedUplinkMessage.Merge(m, src) +} +func (m *RoutedUplinkMessage) XXX_Size() int { + return m.Size() +} +func (m *RoutedUplinkMessage) XXX_DiscardUnknown() { + xxx_messageInfo_RoutedUplinkMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_RoutedUplinkMessage proto.InternalMessageInfo + +func (m *RoutedUplinkMessage) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *RoutedUplinkMessage) GetForwarderNetId() uint32 { + if m != nil { + return m.ForwarderNetId + } + return 0 +} + +func (m *RoutedUplinkMessage) GetForwarderId() string { + if m != nil { + return m.ForwarderId + } + return "" +} + +func (m *RoutedUplinkMessage) GetHomeNetworkNetId() uint32 { + if m != nil { + return m.HomeNetworkNetId + } + return 0 +} + +func (m *RoutedUplinkMessage) GetMessage() *UplinkMessage { + if m != nil { + return m.Message + } + return nil +} + +func (m *RoutedUplinkMessage) GetHops() []*RouteHop { + if m != nil { + return m.Hops + } + return nil +} + +// Downlink message routed from a Home Network to a Forwarder. +type RoutedDownlinkMessage struct { + // Message identifier generated by the Router. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // LoRa Alliance NetID of the Home Network Member. + HomeNetworkNetId uint32 `protobuf:"varint,2,opt,name=home_network_net_id,json=homeNetworkNetId,proto3" json:"home_network_net_id,omitempty"` + // LoRa Alliance NetID of the Forwarder Member. + ForwarderNetId uint32 `protobuf:"varint,3,opt,name=forwarder_net_id,json=forwarderNetId,proto3" json:"forwarder_net_id,omitempty"` + // Forwarder identifier issued by the Forwarder Member. + ForwarderId string `protobuf:"bytes,4,opt,name=forwarder_id,json=forwarderId,proto3" json:"forwarder_id,omitempty"` + // Downlink message. + Message *DownlinkMessage `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"` + // Hops that the message passed. Each Router appends an entry. + Hops []*RouteHop `protobuf:"bytes,6,rep,name=hops,proto3" json:"hops,omitempty"` +} + +func (m *RoutedDownlinkMessage) Reset() { *m = RoutedDownlinkMessage{} } +func (m *RoutedDownlinkMessage) String() string { return proto.CompactTextString(m) } +func (*RoutedDownlinkMessage) ProtoMessage() {} +func (*RoutedDownlinkMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_dcf6e9916911dcb7, []int{4} +} +func (m *RoutedDownlinkMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RoutedDownlinkMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RoutedDownlinkMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RoutedDownlinkMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_RoutedDownlinkMessage.Merge(m, src) +} +func (m *RoutedDownlinkMessage) XXX_Size() int { + return m.Size() +} +func (m *RoutedDownlinkMessage) XXX_DiscardUnknown() { + xxx_messageInfo_RoutedDownlinkMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_RoutedDownlinkMessage proto.InternalMessageInfo + +func (m *RoutedDownlinkMessage) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *RoutedDownlinkMessage) GetHomeNetworkNetId() uint32 { + if m != nil { + return m.HomeNetworkNetId + } + return 0 +} + +func (m *RoutedDownlinkMessage) GetForwarderNetId() uint32 { + if m != nil { + return m.ForwarderNetId + } + return 0 +} + +func (m *RoutedDownlinkMessage) GetForwarderId() string { + if m != nil { + return m.ForwarderId + } + return "" +} + +func (m *RoutedDownlinkMessage) GetMessage() *DownlinkMessage { + if m != nil { + return m.Message + } + return nil +} + +func (m *RoutedDownlinkMessage) GetHops() []*RouteHop { + if m != nil { + return m.Hops + } + return nil +} + +func init() { + proto.RegisterType((*RoutingPolicy)(nil), "org.packetbroker.v1alpha1.RoutingPolicy") + proto.RegisterType((*RoutingPolicy_Uplink)(nil), "org.packetbroker.v1alpha1.RoutingPolicy.Uplink") + proto.RegisterType((*RoutingPolicy_Downlink)(nil), "org.packetbroker.v1alpha1.RoutingPolicy.Downlink") + proto.RegisterType((*RoutingFilter)(nil), "org.packetbroker.v1alpha1.RoutingFilter") + proto.RegisterType((*RoutingFilter_Forwarder)(nil), "org.packetbroker.v1alpha1.RoutingFilter.Forwarder") + proto.RegisterType((*RoutingFilter_JoinRequest)(nil), "org.packetbroker.v1alpha1.RoutingFilter.JoinRequest") + proto.RegisterType((*RoutingFilter_JoinRequest_EUIPrefixes)(nil), "org.packetbroker.v1alpha1.RoutingFilter.JoinRequest.EUIPrefixes") + proto.RegisterType((*RoutingFilter_MACPayload)(nil), "org.packetbroker.v1alpha1.RoutingFilter.MACPayload") + proto.RegisterType((*RoutingFilter_MACPayload_DevAddrPrefix)(nil), "org.packetbroker.v1alpha1.RoutingFilter.MACPayload.DevAddrPrefix") + proto.RegisterType((*RoutingFilter_MACPayload_FPortRange)(nil), "org.packetbroker.v1alpha1.RoutingFilter.MACPayload.FPortRange") + proto.RegisterType((*RouteHop)(nil), "org.packetbroker.v1alpha1.RouteHop") + proto.RegisterType((*RoutedUplinkMessage)(nil), "org.packetbroker.v1alpha1.RoutedUplinkMessage") + proto.RegisterType((*RoutedDownlinkMessage)(nil), "org.packetbroker.v1alpha1.RoutedDownlinkMessage") +} + +func init() { + proto.RegisterFile("packetbroker/api/v1alpha1/routing.proto", fileDescriptor_dcf6e9916911dcb7) +} + +var fileDescriptor_dcf6e9916911dcb7 = []byte{ + // 1071 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4d, 0x6f, 0xe3, 0xc4, + 0x1b, 0x6f, 0x5e, 0x9a, 0x26, 0x8f, 0x93, 0xb6, 0xff, 0xd9, 0xff, 0x42, 0xd6, 0x87, 0x6c, 0x37, + 0xcb, 0x4b, 0x40, 0x5a, 0x47, 0xcd, 0x22, 0x81, 0xb4, 0x02, 0x91, 0xd2, 0x57, 0x44, 0x4b, 0x19, + 0xb1, 0x48, 0x70, 0xb1, 0xa6, 0xf6, 0xc4, 0x1d, 0x6a, 0x7b, 0xdc, 0xf1, 0x38, 0xa1, 0x9c, 0x38, + 0x70, 0x87, 0x4f, 0xc0, 0x81, 0x2f, 0xc2, 0x95, 0xe3, 0x1e, 0x91, 0xb8, 0xa0, 0xf6, 0xc8, 0x97, + 0x40, 0x9e, 0xb1, 0x9d, 0xa4, 0x90, 0x6e, 0x55, 0xb8, 0x79, 0x7e, 0xcf, 0xf3, 0xfb, 0xf9, 0x79, + 0x9b, 0xc7, 0x86, 0x37, 0x23, 0xe2, 0x9c, 0x51, 0x79, 0x22, 0xf8, 0x19, 0x15, 0x7d, 0x12, 0xb1, + 0xfe, 0x78, 0x93, 0xf8, 0xd1, 0x29, 0xd9, 0xec, 0x0b, 0x9e, 0x48, 0x16, 0x7a, 0x56, 0x24, 0xb8, + 0xe4, 0xe8, 0x01, 0x17, 0x9e, 0x35, 0xeb, 0x6c, 0xe5, 0x8e, 0xe6, 0x43, 0x8f, 0x73, 0xcf, 0xa7, + 0x7d, 0xe5, 0x78, 0x92, 0x8c, 0xfa, 0x92, 0x05, 0x34, 0x96, 0x24, 0x88, 0x34, 0xd7, 0xec, 0x5c, + 0x77, 0x98, 0x08, 0x12, 0x45, 0x54, 0xc4, 0x99, 0xbd, 0xb7, 0x38, 0x88, 0x80, 0xc6, 0x31, 0xf1, + 0x68, 0xe6, 0xd9, 0xfd, 0xae, 0x0a, 0x2d, 0xac, 0xe3, 0x3a, 0xe6, 0x3e, 0x73, 0x2e, 0xd0, 0x1e, + 0xd4, 0x92, 0xc8, 0x67, 0xe1, 0x59, 0xbb, 0xb4, 0x51, 0xea, 0x19, 0x83, 0xbe, 0xb5, 0x30, 0x50, + 0x6b, 0x8e, 0x69, 0x3d, 0x57, 0x34, 0x9c, 0xd1, 0xd1, 0x21, 0xd4, 0x5d, 0x3e, 0x09, 0x95, 0x54, + 0x59, 0x49, 0x6d, 0xde, 0x5a, 0x6a, 0x3b, 0x23, 0xe2, 0x42, 0xc2, 0xbc, 0x2a, 0x41, 0x4d, 0xbf, + 0x01, 0x3d, 0x82, 0xe6, 0xd7, 0x9c, 0x85, 0xb6, 0xa0, 0xe7, 0x09, 0x8d, 0xa5, 0x0a, 0xb4, 0x8e, + 0x8d, 0x14, 0xc3, 0x1a, 0x42, 0x0f, 0xa0, 0x1e, 0x10, 0xc7, 0x76, 0x89, 0x24, 0xea, 0xe5, 0x75, + 0xbc, 0x12, 0x10, 0x67, 0x9b, 0x48, 0x82, 0xde, 0x82, 0x75, 0x12, 0x45, 0x3e, 0x73, 0x88, 0x64, + 0x3c, 0xd4, 0x2e, 0x15, 0xe5, 0xb2, 0x36, 0x83, 0x2b, 0xd7, 0xd7, 0x61, 0x35, 0x66, 0x5e, 0x48, + 0x7c, 0xfb, 0x3c, 0x21, 0x3e, 0x93, 0x17, 0xed, 0xaa, 0x72, 0x6c, 0x69, 0xf4, 0x33, 0x0d, 0xa2, + 0x2e, 0x34, 0x7d, 0xee, 0x10, 0x9f, 0x7d, 0xab, 0xa8, 0xed, 0x65, 0xe5, 0x34, 0x87, 0xa5, 0x52, + 0xc4, 0xf7, 0xf9, 0xc4, 0x2e, 0x6a, 0x52, 0xd3, 0x52, 0x0a, 0xcd, 0xf3, 0x35, 0xcf, 0xa1, 0x9e, + 0x3f, 0xa3, 0x87, 0xa0, 0x52, 0xb2, 0x89, 0xe3, 0xd0, 0x28, 0xcf, 0x12, 0x52, 0x68, 0xa8, 0x90, + 0xff, 0x26, 0xc9, 0xee, 0x9f, 0xf5, 0x62, 0x04, 0x76, 0x99, 0x2f, 0xa9, 0x40, 0x18, 0x60, 0xc4, + 0xc5, 0x84, 0x08, 0x97, 0x8a, 0xb8, 0x5d, 0xda, 0xa8, 0xf4, 0x8c, 0xc1, 0xe0, 0xe5, 0xbd, 0xd3, + 0x6c, 0x6b, 0x37, 0xa7, 0xe2, 0x19, 0x15, 0xf4, 0xe5, 0xb5, 0x9e, 0xe9, 0x89, 0x78, 0xe7, 0xd6, + 0xaa, 0x1f, 0x4f, 0x9b, 0xbb, 0xbf, 0x34, 0xdf, 0xeb, 0x3d, 0xa8, 0x04, 0xc4, 0x51, 0xe9, 0x19, + 0x83, 0xa7, 0xb7, 0x56, 0x3c, 0x1c, 0x7e, 0x74, 0x4c, 0x2e, 0x7c, 0x4e, 0xdc, 0xfd, 0x25, 0x9c, + 0x2a, 0xa0, 0x1d, 0x58, 0xf7, 0x88, 0xa4, 0x13, 0x72, 0x61, 0x07, 0x54, 0x12, 0x55, 0xb4, 0xaa, + 0x52, 0x35, 0x2d, 0x7d, 0xe3, 0xac, 0xfc, 0xc6, 0x59, 0x5b, 0x9c, 0xfb, 0x5f, 0x10, 0x3f, 0xa1, + 0x78, 0x2d, 0xe3, 0x1c, 0x66, 0x14, 0x73, 0x0f, 0x1a, 0x45, 0x0d, 0xd0, 0x7d, 0xa8, 0x85, 0x54, + 0xda, 0xcc, 0x55, 0xfd, 0x6b, 0xe1, 0xe5, 0x90, 0xca, 0x03, 0x17, 0x3d, 0x86, 0x56, 0x51, 0x1c, + 0x9b, 0xb9, 0x71, 0xbb, 0xbc, 0x51, 0xe9, 0x35, 0x70, 0xb3, 0x00, 0x0f, 0xdc, 0xd8, 0xfc, 0xbe, + 0x0c, 0xc6, 0x4c, 0xde, 0xc8, 0x81, 0x26, 0x4d, 0x98, 0x1d, 0x09, 0x3a, 0x62, 0xdf, 0xd0, 0xbc, + 0x33, 0x1f, 0xde, 0xa5, 0x86, 0xd6, 0xce, 0xf3, 0x83, 0xe3, 0x4c, 0x07, 0x1b, 0x34, 0x61, 0xf9, + 0xc1, 0xfc, 0xa1, 0x04, 0xc6, 0x8c, 0x31, 0x1d, 0x32, 0xd5, 0x38, 0x9a, 0x30, 0x95, 0x42, 0x0d, + 0xaf, 0xa4, 0xe7, 0x9d, 0x84, 0xa1, 0x37, 0x60, 0x2d, 0x37, 0xd9, 0x3e, 0x0d, 0x3d, 0x79, 0xaa, + 0xda, 0xda, 0xc2, 0xad, 0xcc, 0xe3, 0x13, 0x05, 0xa2, 0x57, 0x61, 0xc5, 0xa5, 0x63, 0xa5, 0x50, + 0x51, 0x0a, 0x35, 0x97, 0x8e, 0x53, 0x81, 0xd7, 0x60, 0x35, 0x33, 0xe4, 0xfc, 0xaa, 0xe2, 0x37, + 0xb5, 0x5d, 0xd3, 0xcd, 0x5f, 0x2a, 0x00, 0xd3, 0x66, 0xa1, 0xf7, 0xa0, 0xe1, 0xf0, 0x70, 0xc4, + 0x44, 0x40, 0xdd, 0x6c, 0x47, 0xdd, 0xd4, 0x9e, 0xa9, 0x33, 0x0a, 0xe0, 0x7f, 0xe9, 0xeb, 0x88, + 0xeb, 0x8a, 0x69, 0x11, 0xcb, 0xaa, 0x88, 0xc3, 0x3b, 0x8c, 0x8d, 0xb5, 0x4d, 0xc7, 0x43, 0xd7, + 0x15, 0xba, 0x54, 0x78, 0xcd, 0x9d, 0x3d, 0xd2, 0x18, 0x6d, 0x42, 0x6d, 0x64, 0xf3, 0x48, 0xc6, + 0xd9, 0x68, 0xde, 0x14, 0xe5, 0xf2, 0xe8, 0xd3, 0x48, 0xc6, 0xe8, 0x04, 0x5a, 0x23, 0x3b, 0xe2, + 0x42, 0xda, 0x82, 0x84, 0x1e, 0x8d, 0xdb, 0x55, 0x15, 0xdd, 0x07, 0x77, 0x89, 0x6e, 0xf7, 0x98, + 0x0b, 0x89, 0x53, 0x19, 0x6c, 0x8c, 0x8a, 0xe7, 0xd8, 0x7c, 0x1f, 0x5a, 0x73, 0x81, 0xa3, 0xff, + 0xc3, 0xf2, 0x38, 0x0d, 0x22, 0x9f, 0x50, 0x75, 0x40, 0xaf, 0x40, 0x6d, 0xae, 0xa7, 0xd9, 0xc9, + 0x1c, 0x00, 0x4c, 0x95, 0xd1, 0x3a, 0x54, 0x7c, 0x3e, 0xc9, 0x98, 0xe9, 0x23, 0x42, 0x50, 0x3d, + 0x65, 0x5e, 0xce, 0x52, 0xcf, 0x5b, 0x0d, 0x58, 0xc9, 0xbe, 0x3b, 0xdd, 0xdf, 0x4b, 0x50, 0x4f, + 0x43, 0xa6, 0xfb, 0x3c, 0x42, 0xcf, 0xc0, 0x10, 0xd4, 0xa1, 0x6c, 0x4c, 0x5d, 0x9b, 0xc8, 0x85, + 0xcd, 0xfc, 0x3c, 0xff, 0xfc, 0x61, 0xc8, 0xdd, 0x87, 0x32, 0x5d, 0x8f, 0x31, 0x0d, 0xd3, 0xfb, + 0x13, 0x92, 0x80, 0xaa, 0xf7, 0x35, 0x30, 0x68, 0xe8, 0x88, 0x04, 0x54, 0x6d, 0x6f, 0xed, 0x90, + 0x76, 0x9c, 0xc6, 0xba, 0x0f, 0x0d, 0xdc, 0xd2, 0xe8, 0x50, 0x83, 0xe9, 0x55, 0xcc, 0x54, 0x33, + 0xa5, 0xaa, 0xf2, 0x6a, 0xe6, 0x60, 0xae, 0x55, 0x38, 0x11, 0x8f, 0x86, 0x52, 0x2d, 0xf9, 0x06, + 0x2e, 0xa8, 0xc3, 0x14, 0xec, 0xfe, 0x54, 0x86, 0x7b, 0x2a, 0x3b, 0x57, 0x7f, 0xaa, 0x0e, 0x75, + 0xd6, 0x68, 0x15, 0xca, 0xd9, 0x06, 0x68, 0xe0, 0x32, 0x73, 0x51, 0x0f, 0xd6, 0xa7, 0xd7, 0x3f, + 0xdb, 0x0f, 0xba, 0x60, 0xab, 0x05, 0x7e, 0xa4, 0x16, 0xc5, 0x23, 0x68, 0xce, 0x2e, 0x8a, 0x2c, + 0x05, 0x63, 0x66, 0x4f, 0xa0, 0x27, 0x70, 0xef, 0x94, 0x07, 0x34, 0xd5, 0x99, 0x70, 0x71, 0x96, + 0xeb, 0xe9, 0xab, 0xb4, 0x9e, 0x9a, 0x8e, 0xb4, 0x45, 0x2b, 0x6e, 0x15, 0xcd, 0x50, 0x39, 0x18, + 0x83, 0xde, 0x0d, 0xd3, 0x35, 0x97, 0x06, 0xce, 0x89, 0xe8, 0x5d, 0xa8, 0x9e, 0xf2, 0x28, 0x6e, + 0xd7, 0xd4, 0x78, 0x3e, 0x7e, 0xc9, 0x78, 0xa6, 0xbd, 0xc6, 0x8a, 0xd0, 0xfd, 0xb9, 0x0c, 0xf7, + 0x75, 0x81, 0xf2, 0xcf, 0xdc, 0xa2, 0x12, 0x2d, 0xc8, 0xaa, 0xbc, 0x20, 0xab, 0x7f, 0xaa, 0x68, + 0xe5, 0x56, 0x15, 0xad, 0xfe, 0xbd, 0xa2, 0xdb, 0xd7, 0x4b, 0xf4, 0xf6, 0x0d, 0x19, 0x5e, 0x4b, + 0xe4, 0xdf, 0x17, 0x69, 0x6b, 0xef, 0xd7, 0xcb, 0x4e, 0xe9, 0xc5, 0x65, 0xa7, 0xf4, 0xc7, 0x65, + 0xa7, 0xf4, 0xe3, 0x55, 0x67, 0xe9, 0xc5, 0x55, 0x67, 0xe9, 0xb7, 0xab, 0xce, 0xd2, 0x57, 0x4f, + 0x3c, 0x3e, 0x2f, 0xc1, 0x85, 0x37, 0xf7, 0x7f, 0xf7, 0x6c, 0xd6, 0x7a, 0x52, 0x53, 0x57, 0xe8, + 0xe9, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x25, 0x5b, 0x57, 0xb8, 0x95, 0x0a, 0x00, 0x00, +} + +func (m *RoutingPolicy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RoutingPolicy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RoutingPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Downlink != nil { + { + size, err := m.Downlink.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRouting(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Uplink != nil { + { + size, err := m.Uplink.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRouting(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RoutingPolicy_Uplink) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RoutingPolicy_Uplink) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RoutingPolicy_Uplink) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AllowDownlink { + i-- + if m.AllowDownlink { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.Localization { + i-- + if m.Localization { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.SignalQuality { + i-- + if m.SignalQuality { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.ApplicationData { + i-- + if m.ApplicationData { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.MacData { + i-- + if m.MacData { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if m.JoinRequest { + i-- + if m.JoinRequest { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RoutingPolicy_Downlink) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RoutingPolicy_Downlink) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RoutingPolicy_Downlink) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ApplicationData { + i-- + if m.ApplicationData { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if m.MacData { + i-- + if m.MacData { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if m.JoinAccept { + i-- + if m.JoinAccept { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RoutingFilter) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RoutingFilter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RoutingFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GatewayMetadata != nil { + { + size, err := m.GatewayMetadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRouting(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.Message != nil { + { + size := m.Message.Size() + i -= size + if _, err := m.Message.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if len(m.Forwarders) > 0 { + for iNdEx := len(m.Forwarders) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Forwarders[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRouting(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *RoutingFilter_JoinRequest_) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RoutingFilter_JoinRequest_) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.JoinRequest != nil { + { + size, err := m.JoinRequest.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRouting(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *RoutingFilter_Mac) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RoutingFilter_Mac) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Mac != nil { + { + size, err := m.Mac.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRouting(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *RoutingFilter_Forwarder) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RoutingFilter_Forwarder) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RoutingFilter_Forwarder) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ForwarderIds) > 0 { + for iNdEx := len(m.ForwarderIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ForwarderIds[iNdEx]) + copy(dAtA[i:], m.ForwarderIds[iNdEx]) + i = encodeVarintRouting(dAtA, i, uint64(len(m.ForwarderIds[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if m.NetId != 0 { + i = encodeVarintRouting(dAtA, i, uint64(m.NetId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RoutingFilter_JoinRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RoutingFilter_JoinRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RoutingFilter_JoinRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.EuiPrefixes) > 0 { + for iNdEx := len(m.EuiPrefixes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.EuiPrefixes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRouting(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *RoutingFilter_JoinRequest_EUIPrefixes) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RoutingFilter_JoinRequest_EUIPrefixes) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RoutingFilter_JoinRequest_EUIPrefixes) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.DevEuiLength != 0 { + i = encodeVarintRouting(dAtA, i, uint64(m.DevEuiLength)) + i-- + dAtA[i] = 0x20 + } + if m.DevEui != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.DevEui)) + i-- + dAtA[i] = 0x19 + } + if m.JoinEuiLength != 0 { + i = encodeVarintRouting(dAtA, i, uint64(m.JoinEuiLength)) + i-- + dAtA[i] = 0x10 + } + if m.JoinEui != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.JoinEui)) + i-- + dAtA[i] = 0x9 + } + return len(dAtA) - i, nil +} + +func (m *RoutingFilter_MACPayload) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RoutingFilter_MACPayload) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RoutingFilter_MACPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FPortRanges) > 0 { + for iNdEx := len(m.FPortRanges) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.FPortRanges[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRouting(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.FOpts != nil { + { + size, err := m.FOpts.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRouting(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.DevAddrPrefixes) > 0 { + for iNdEx := len(m.DevAddrPrefixes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.DevAddrPrefixes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRouting(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Confirmed != nil { + { + size, err := m.Confirmed.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRouting(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RoutingFilter_MACPayload_DevAddrPrefix) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RoutingFilter_MACPayload_DevAddrPrefix) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RoutingFilter_MACPayload_DevAddrPrefix) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Length != 0 { + i = encodeVarintRouting(dAtA, i, uint64(m.Length)) + i-- + dAtA[i] = 0x10 + } + if m.Value != 0 { + i = encodeVarintRouting(dAtA, i, uint64(m.Value)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RoutingFilter_MACPayload_FPortRange) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RoutingFilter_MACPayload_FPortRange) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RoutingFilter_MACPayload_FPortRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.High != 0 { + i = encodeVarintRouting(dAtA, i, uint64(m.High)) + i-- + dAtA[i] = 0x10 + } + if m.Low != 0 { + i = encodeVarintRouting(dAtA, i, uint64(m.Low)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RouteHop) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RouteHop) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RouteHop) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ReceiverAgent) > 0 { + i -= len(m.ReceiverAgent) + copy(dAtA[i:], m.ReceiverAgent) + i = encodeVarintRouting(dAtA, i, uint64(len(m.ReceiverAgent))) + i-- + dAtA[i] = 0x2a + } + if len(m.ReceiverName) > 0 { + i -= len(m.ReceiverName) + copy(dAtA[i:], m.ReceiverName) + i = encodeVarintRouting(dAtA, i, uint64(len(m.ReceiverName))) + i-- + dAtA[i] = 0x22 + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = encodeVarintRouting(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.SenderName) > 0 { + i -= len(m.SenderName) + copy(dAtA[i:], m.SenderName) + i = encodeVarintRouting(dAtA, i, uint64(len(m.SenderName))) + i-- + dAtA[i] = 0x12 + } + if m.ReceivedAt != nil { + { + size, err := m.ReceivedAt.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRouting(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RoutedUplinkMessage) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RoutedUplinkMessage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RoutedUplinkMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Hops) > 0 { + for iNdEx := len(m.Hops) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Hops[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRouting(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if m.Message != nil { + { + size, err := m.Message.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRouting(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.HomeNetworkNetId != 0 { + i = encodeVarintRouting(dAtA, i, uint64(m.HomeNetworkNetId)) + i-- + dAtA[i] = 0x20 + } + if len(m.ForwarderId) > 0 { + i -= len(m.ForwarderId) + copy(dAtA[i:], m.ForwarderId) + i = encodeVarintRouting(dAtA, i, uint64(len(m.ForwarderId))) + i-- + dAtA[i] = 0x1a + } + if m.ForwarderNetId != 0 { + i = encodeVarintRouting(dAtA, i, uint64(m.ForwarderNetId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintRouting(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RoutedDownlinkMessage) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RoutedDownlinkMessage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RoutedDownlinkMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Hops) > 0 { + for iNdEx := len(m.Hops) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Hops[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRouting(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if m.Message != nil { + { + size, err := m.Message.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRouting(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if len(m.ForwarderId) > 0 { + i -= len(m.ForwarderId) + copy(dAtA[i:], m.ForwarderId) + i = encodeVarintRouting(dAtA, i, uint64(len(m.ForwarderId))) + i-- + dAtA[i] = 0x22 + } + if m.ForwarderNetId != 0 { + i = encodeVarintRouting(dAtA, i, uint64(m.ForwarderNetId)) + i-- + dAtA[i] = 0x18 + } + if m.HomeNetworkNetId != 0 { + i = encodeVarintRouting(dAtA, i, uint64(m.HomeNetworkNetId)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintRouting(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintRouting(dAtA []byte, offset int, v uint64) int { + offset -= sovRouting(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *RoutingPolicy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Uplink != nil { + l = m.Uplink.Size() + n += 1 + l + sovRouting(uint64(l)) + } + if m.Downlink != nil { + l = m.Downlink.Size() + n += 1 + l + sovRouting(uint64(l)) + } + return n +} + +func (m *RoutingPolicy_Uplink) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.JoinRequest { + n += 2 + } + if m.MacData { + n += 2 + } + if m.ApplicationData { + n += 2 + } + if m.SignalQuality { + n += 2 + } + if m.Localization { + n += 2 + } + if m.AllowDownlink { + n += 2 + } + return n +} + +func (m *RoutingPolicy_Downlink) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.JoinAccept { + n += 2 + } + if m.MacData { + n += 2 + } + if m.ApplicationData { + n += 2 + } + return n +} + +func (m *RoutingFilter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Forwarders) > 0 { + for _, e := range m.Forwarders { + l = e.Size() + n += 1 + l + sovRouting(uint64(l)) + } + } + if m.Message != nil { + n += m.Message.Size() + } + if m.GatewayMetadata != nil { + l = m.GatewayMetadata.Size() + n += 1 + l + sovRouting(uint64(l)) + } + return n +} + +func (m *RoutingFilter_JoinRequest_) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.JoinRequest != nil { + l = m.JoinRequest.Size() + n += 1 + l + sovRouting(uint64(l)) + } + return n +} +func (m *RoutingFilter_Mac) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Mac != nil { + l = m.Mac.Size() + n += 1 + l + sovRouting(uint64(l)) + } + return n +} +func (m *RoutingFilter_Forwarder) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NetId != 0 { + n += 1 + sovRouting(uint64(m.NetId)) + } + if len(m.ForwarderIds) > 0 { + for _, s := range m.ForwarderIds { + l = len(s) + n += 1 + l + sovRouting(uint64(l)) + } + } + return n +} + +func (m *RoutingFilter_JoinRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.EuiPrefixes) > 0 { + for _, e := range m.EuiPrefixes { + l = e.Size() + n += 1 + l + sovRouting(uint64(l)) + } + } + return n +} + +func (m *RoutingFilter_JoinRequest_EUIPrefixes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.JoinEui != 0 { + n += 9 + } + if m.JoinEuiLength != 0 { + n += 1 + sovRouting(uint64(m.JoinEuiLength)) + } + if m.DevEui != 0 { + n += 9 + } + if m.DevEuiLength != 0 { + n += 1 + sovRouting(uint64(m.DevEuiLength)) + } + return n +} + +func (m *RoutingFilter_MACPayload) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Confirmed != nil { + l = m.Confirmed.Size() + n += 1 + l + sovRouting(uint64(l)) + } + if len(m.DevAddrPrefixes) > 0 { + for _, e := range m.DevAddrPrefixes { + l = e.Size() + n += 1 + l + sovRouting(uint64(l)) + } + } + if m.FOpts != nil { + l = m.FOpts.Size() + n += 1 + l + sovRouting(uint64(l)) + } + if len(m.FPortRanges) > 0 { + for _, e := range m.FPortRanges { + l = e.Size() + n += 1 + l + sovRouting(uint64(l)) + } + } + return n +} + +func (m *RoutingFilter_MACPayload_DevAddrPrefix) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != 0 { + n += 1 + sovRouting(uint64(m.Value)) + } + if m.Length != 0 { + n += 1 + sovRouting(uint64(m.Length)) + } + return n +} + +func (m *RoutingFilter_MACPayload_FPortRange) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Low != 0 { + n += 1 + sovRouting(uint64(m.Low)) + } + if m.High != 0 { + n += 1 + sovRouting(uint64(m.High)) + } + return n +} + +func (m *RouteHop) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ReceivedAt != nil { + l = m.ReceivedAt.Size() + n += 1 + l + sovRouting(uint64(l)) + } + l = len(m.SenderName) + if l > 0 { + n += 1 + l + sovRouting(uint64(l)) + } + l = len(m.SenderAddress) + if l > 0 { + n += 1 + l + sovRouting(uint64(l)) + } + l = len(m.ReceiverName) + if l > 0 { + n += 1 + l + sovRouting(uint64(l)) + } + l = len(m.ReceiverAgent) + if l > 0 { + n += 1 + l + sovRouting(uint64(l)) + } + return n +} + +func (m *RoutedUplinkMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovRouting(uint64(l)) + } + if m.ForwarderNetId != 0 { + n += 1 + sovRouting(uint64(m.ForwarderNetId)) + } + l = len(m.ForwarderId) + if l > 0 { + n += 1 + l + sovRouting(uint64(l)) + } + if m.HomeNetworkNetId != 0 { + n += 1 + sovRouting(uint64(m.HomeNetworkNetId)) + } + if m.Message != nil { + l = m.Message.Size() + n += 1 + l + sovRouting(uint64(l)) + } + if len(m.Hops) > 0 { + for _, e := range m.Hops { + l = e.Size() + n += 1 + l + sovRouting(uint64(l)) + } + } + return n +} + +func (m *RoutedDownlinkMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovRouting(uint64(l)) + } + if m.HomeNetworkNetId != 0 { + n += 1 + sovRouting(uint64(m.HomeNetworkNetId)) + } + if m.ForwarderNetId != 0 { + n += 1 + sovRouting(uint64(m.ForwarderNetId)) + } + l = len(m.ForwarderId) + if l > 0 { + n += 1 + l + sovRouting(uint64(l)) + } + if m.Message != nil { + l = m.Message.Size() + n += 1 + l + sovRouting(uint64(l)) + } + if len(m.Hops) > 0 { + for _, e := range m.Hops { + l = e.Size() + n += 1 + l + sovRouting(uint64(l)) + } + } + return n +} + +func sovRouting(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozRouting(x uint64) (n int) { + return sovRouting(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *RoutingPolicy) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RoutingPolicy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RoutingPolicy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uplink", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uplink == nil { + m.Uplink = &RoutingPolicy_Uplink{} + } + if err := m.Uplink.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Downlink", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Downlink == nil { + m.Downlink = &RoutingPolicy_Downlink{} + } + if err := m.Downlink.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRouting(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoutingPolicy_Uplink) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Uplink: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Uplink: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field JoinRequest", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.JoinRequest = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MacData", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.MacData = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ApplicationData", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ApplicationData = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SignalQuality", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SignalQuality = bool(v != 0) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Localization", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Localization = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowDownlink", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AllowDownlink = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipRouting(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoutingPolicy_Downlink) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Downlink: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Downlink: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field JoinAccept", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.JoinAccept = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MacData", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.MacData = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ApplicationData", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ApplicationData = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipRouting(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoutingFilter) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RoutingFilter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RoutingFilter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Forwarders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Forwarders = append(m.Forwarders, &RoutingFilter_Forwarder{}) + if err := m.Forwarders[len(m.Forwarders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JoinRequest", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &RoutingFilter_JoinRequest{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Message = &RoutingFilter_JoinRequest_{v} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mac", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &RoutingFilter_MACPayload{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Message = &RoutingFilter_Mac{v} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GatewayMetadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GatewayMetadata == nil { + m.GatewayMetadata = &types.BoolValue{} + } + if err := m.GatewayMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRouting(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoutingFilter_Forwarder) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Forwarder: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Forwarder: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NetId", wireType) + } + m.NetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderIds", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForwarderIds = append(m.ForwarderIds, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRouting(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoutingFilter_JoinRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: JoinRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: JoinRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EuiPrefixes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.EuiPrefixes = append(m.EuiPrefixes, &RoutingFilter_JoinRequest_EUIPrefixes{}) + if err := m.EuiPrefixes[len(m.EuiPrefixes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRouting(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoutingFilter_JoinRequest_EUIPrefixes) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EUIPrefixes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EUIPrefixes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field JoinEui", wireType) + } + m.JoinEui = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.JoinEui = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field JoinEuiLength", wireType) + } + m.JoinEuiLength = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.JoinEuiLength |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field DevEui", wireType) + } + m.DevEui = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.DevEui = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DevEuiLength", wireType) + } + m.DevEuiLength = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DevEuiLength |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRouting(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoutingFilter_MACPayload) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MACPayload: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MACPayload: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Confirmed", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Confirmed == nil { + m.Confirmed = &types.BoolValue{} + } + if err := m.Confirmed.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DevAddrPrefixes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DevAddrPrefixes = append(m.DevAddrPrefixes, &RoutingFilter_MACPayload_DevAddrPrefix{}) + if err := m.DevAddrPrefixes[len(m.DevAddrPrefixes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FOpts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FOpts == nil { + m.FOpts = &types.BoolValue{} + } + if err := m.FOpts.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FPortRanges", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FPortRanges = append(m.FPortRanges, &RoutingFilter_MACPayload_FPortRange{}) + if err := m.FPortRanges[len(m.FPortRanges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRouting(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoutingFilter_MACPayload_DevAddrPrefix) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DevAddrPrefix: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DevAddrPrefix: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Length", wireType) + } + m.Length = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Length |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRouting(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoutingFilter_MACPayload_FPortRange) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FPortRange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FPortRange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Low", wireType) + } + m.Low = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Low |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field High", wireType) + } + m.High = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.High |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRouting(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RouteHop) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RouteHop: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RouteHop: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReceivedAt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ReceivedAt == nil { + m.ReceivedAt = &types.Timestamp{} + } + if err := m.ReceivedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReceiverName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReceiverName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReceiverAgent", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReceiverAgent = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRouting(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoutedUplinkMessage) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RoutedUplinkMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RoutedUplinkMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderNetId", wireType) + } + m.ForwarderNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ForwarderNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForwarderId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HomeNetworkNetId", wireType) + } + m.HomeNetworkNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HomeNetworkNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Message == nil { + m.Message = &UplinkMessage{} + } + if err := m.Message.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hops", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hops = append(m.Hops, &RouteHop{}) + if err := m.Hops[len(m.Hops)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRouting(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RoutedDownlinkMessage) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RoutedDownlinkMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RoutedDownlinkMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HomeNetworkNetId", wireType) + } + m.HomeNetworkNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HomeNetworkNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderNetId", wireType) + } + m.ForwarderNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ForwarderNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForwarderId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Message == nil { + m.Message = &DownlinkMessage{} + } + if err := m.Message.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hops", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRouting + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRouting + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRouting + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hops = append(m.Hops, &RouteHop{}) + if err := m.Hops[len(m.Hops)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRouting(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRouting + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipRouting(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRouting + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRouting + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRouting + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthRouting + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupRouting + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthRouting + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthRouting = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRouting = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupRouting = fmt.Errorf("proto: unexpected end of group") +) diff --git a/v1alpha1/routing_services.pb.go b/v1alpha1/routing_services.pb.go new file mode 100644 index 0000000..185f08d --- /dev/null +++ b/v1alpha1/routing_services.pb.go @@ -0,0 +1,4117 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: packetbroker/api/v1alpha1/routing_services.proto + +package packetbroker + +import ( + context "context" + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + types "github.com/gogo/protobuf/types" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type GetDefaultRoutingPolicyRequest struct { + // LoRa Alliance NetID of the Forwarder Member. + ForwarderNetId uint32 `protobuf:"varint,1,opt,name=forwarder_net_id,json=forwarderNetId,proto3" json:"forwarder_net_id,omitempty"` + // Forwarder identifier issued by the Forwarder Member. + ForwarderId string `protobuf:"bytes,2,opt,name=forwarder_id,json=forwarderId,proto3" json:"forwarder_id,omitempty"` +} + +func (m *GetDefaultRoutingPolicyRequest) Reset() { *m = GetDefaultRoutingPolicyRequest{} } +func (m *GetDefaultRoutingPolicyRequest) String() string { return proto.CompactTextString(m) } +func (*GetDefaultRoutingPolicyRequest) ProtoMessage() {} +func (*GetDefaultRoutingPolicyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d82f572a7cd33550, []int{0} +} +func (m *GetDefaultRoutingPolicyRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetDefaultRoutingPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetDefaultRoutingPolicyRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetDefaultRoutingPolicyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetDefaultRoutingPolicyRequest.Merge(m, src) +} +func (m *GetDefaultRoutingPolicyRequest) XXX_Size() int { + return m.Size() +} +func (m *GetDefaultRoutingPolicyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetDefaultRoutingPolicyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetDefaultRoutingPolicyRequest proto.InternalMessageInfo + +func (m *GetDefaultRoutingPolicyRequest) GetForwarderNetId() uint32 { + if m != nil { + return m.ForwarderNetId + } + return 0 +} + +func (m *GetDefaultRoutingPolicyRequest) GetForwarderId() string { + if m != nil { + return m.ForwarderId + } + return "" +} + +type SetDefaultRoutingPolicyRequest struct { + // LoRa Alliance NetID of the Forwarder Member. + ForwarderNetId uint32 `protobuf:"varint,1,opt,name=forwarder_net_id,json=forwarderNetId,proto3" json:"forwarder_net_id,omitempty"` + // Forwarder identifier issued by the Forwarder Member. + ForwarderId string `protobuf:"bytes,2,opt,name=forwarder_id,json=forwarderId,proto3" json:"forwarder_id,omitempty"` + // New default Routing Policy. + Policy *RoutingPolicy `protobuf:"bytes,3,opt,name=policy,proto3" json:"policy,omitempty"` +} + +func (m *SetDefaultRoutingPolicyRequest) Reset() { *m = SetDefaultRoutingPolicyRequest{} } +func (m *SetDefaultRoutingPolicyRequest) String() string { return proto.CompactTextString(m) } +func (*SetDefaultRoutingPolicyRequest) ProtoMessage() {} +func (*SetDefaultRoutingPolicyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d82f572a7cd33550, []int{1} +} +func (m *SetDefaultRoutingPolicyRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SetDefaultRoutingPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SetDefaultRoutingPolicyRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SetDefaultRoutingPolicyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetDefaultRoutingPolicyRequest.Merge(m, src) +} +func (m *SetDefaultRoutingPolicyRequest) XXX_Size() int { + return m.Size() +} +func (m *SetDefaultRoutingPolicyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SetDefaultRoutingPolicyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SetDefaultRoutingPolicyRequest proto.InternalMessageInfo + +func (m *SetDefaultRoutingPolicyRequest) GetForwarderNetId() uint32 { + if m != nil { + return m.ForwarderNetId + } + return 0 +} + +func (m *SetDefaultRoutingPolicyRequest) GetForwarderId() string { + if m != nil { + return m.ForwarderId + } + return "" +} + +func (m *SetDefaultRoutingPolicyRequest) GetPolicy() *RoutingPolicy { + if m != nil { + return m.Policy + } + return nil +} + +type GetHomeNetworkRoutingPolicyRequest struct { + // LoRa Alliance NetID of the Forwarder Member. + ForwarderNetId uint32 `protobuf:"varint,1,opt,name=forwarder_net_id,json=forwarderNetId,proto3" json:"forwarder_net_id,omitempty"` + // Forwarder identifier issued by the Forwarder Member. + ForwarderId string `protobuf:"bytes,2,opt,name=forwarder_id,json=forwarderId,proto3" json:"forwarder_id,omitempty"` + // LoRa Alliance NetID of the Home Network Member. + HomeNetworkNetId uint32 `protobuf:"varint,3,opt,name=home_network_net_id,json=homeNetworkNetId,proto3" json:"home_network_net_id,omitempty"` +} + +func (m *GetHomeNetworkRoutingPolicyRequest) Reset() { *m = GetHomeNetworkRoutingPolicyRequest{} } +func (m *GetHomeNetworkRoutingPolicyRequest) String() string { return proto.CompactTextString(m) } +func (*GetHomeNetworkRoutingPolicyRequest) ProtoMessage() {} +func (*GetHomeNetworkRoutingPolicyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d82f572a7cd33550, []int{2} +} +func (m *GetHomeNetworkRoutingPolicyRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetHomeNetworkRoutingPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetHomeNetworkRoutingPolicyRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetHomeNetworkRoutingPolicyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetHomeNetworkRoutingPolicyRequest.Merge(m, src) +} +func (m *GetHomeNetworkRoutingPolicyRequest) XXX_Size() int { + return m.Size() +} +func (m *GetHomeNetworkRoutingPolicyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetHomeNetworkRoutingPolicyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetHomeNetworkRoutingPolicyRequest proto.InternalMessageInfo + +func (m *GetHomeNetworkRoutingPolicyRequest) GetForwarderNetId() uint32 { + if m != nil { + return m.ForwarderNetId + } + return 0 +} + +func (m *GetHomeNetworkRoutingPolicyRequest) GetForwarderId() string { + if m != nil { + return m.ForwarderId + } + return "" +} + +func (m *GetHomeNetworkRoutingPolicyRequest) GetHomeNetworkNetId() uint32 { + if m != nil { + return m.HomeNetworkNetId + } + return 0 +} + +type SetHomeNetworkRoutingPolicyRequest struct { + // LoRa Alliance NetID of the Forwarder Member. + ForwarderNetId uint32 `protobuf:"varint,1,opt,name=forwarder_net_id,json=forwarderNetId,proto3" json:"forwarder_net_id,omitempty"` + // Forwarder identifier issued by the Forwarder Member. + ForwarderId string `protobuf:"bytes,2,opt,name=forwarder_id,json=forwarderId,proto3" json:"forwarder_id,omitempty"` + // LoRa Alliance NetID of the Home Network Member. + HomeNetworkNetId uint32 `protobuf:"varint,3,opt,name=home_network_net_id,json=homeNetworkNetId,proto3" json:"home_network_net_id,omitempty"` + // New Routing Policy for the Home Network Member. + Policy *RoutingPolicy `protobuf:"bytes,4,opt,name=policy,proto3" json:"policy,omitempty"` +} + +func (m *SetHomeNetworkRoutingPolicyRequest) Reset() { *m = SetHomeNetworkRoutingPolicyRequest{} } +func (m *SetHomeNetworkRoutingPolicyRequest) String() string { return proto.CompactTextString(m) } +func (*SetHomeNetworkRoutingPolicyRequest) ProtoMessage() {} +func (*SetHomeNetworkRoutingPolicyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d82f572a7cd33550, []int{3} +} +func (m *SetHomeNetworkRoutingPolicyRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SetHomeNetworkRoutingPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SetHomeNetworkRoutingPolicyRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SetHomeNetworkRoutingPolicyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetHomeNetworkRoutingPolicyRequest.Merge(m, src) +} +func (m *SetHomeNetworkRoutingPolicyRequest) XXX_Size() int { + return m.Size() +} +func (m *SetHomeNetworkRoutingPolicyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SetHomeNetworkRoutingPolicyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SetHomeNetworkRoutingPolicyRequest proto.InternalMessageInfo + +func (m *SetHomeNetworkRoutingPolicyRequest) GetForwarderNetId() uint32 { + if m != nil { + return m.ForwarderNetId + } + return 0 +} + +func (m *SetHomeNetworkRoutingPolicyRequest) GetForwarderId() string { + if m != nil { + return m.ForwarderId + } + return "" +} + +func (m *SetHomeNetworkRoutingPolicyRequest) GetHomeNetworkNetId() uint32 { + if m != nil { + return m.HomeNetworkNetId + } + return 0 +} + +func (m *SetHomeNetworkRoutingPolicyRequest) GetPolicy() *RoutingPolicy { + if m != nil { + return m.Policy + } + return nil +} + +type GetRoutingPolicyResponse struct { + Policy *RoutingPolicy `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` +} + +func (m *GetRoutingPolicyResponse) Reset() { *m = GetRoutingPolicyResponse{} } +func (m *GetRoutingPolicyResponse) String() string { return proto.CompactTextString(m) } +func (*GetRoutingPolicyResponse) ProtoMessage() {} +func (*GetRoutingPolicyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d82f572a7cd33550, []int{4} +} +func (m *GetRoutingPolicyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRoutingPolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRoutingPolicyResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetRoutingPolicyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRoutingPolicyResponse.Merge(m, src) +} +func (m *GetRoutingPolicyResponse) XXX_Size() int { + return m.Size() +} +func (m *GetRoutingPolicyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetRoutingPolicyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetRoutingPolicyResponse proto.InternalMessageInfo + +func (m *GetRoutingPolicyResponse) GetPolicy() *RoutingPolicy { + if m != nil { + return m.Policy + } + return nil +} + +type PublishUplinkMessageRequest struct { + // LoRa Alliance NetID of the Forwarder Member. + ForwarderNetId uint32 `protobuf:"varint,1,opt,name=forwarder_net_id,json=forwarderNetId,proto3" json:"forwarder_net_id,omitempty"` + // Forwarder identifier issued by the Forwarder Member. + ForwarderId string `protobuf:"bytes,2,opt,name=forwarder_id,json=forwarderId,proto3" json:"forwarder_id,omitempty"` + // Uplink message to publish. + Message *UplinkMessage `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` +} + +func (m *PublishUplinkMessageRequest) Reset() { *m = PublishUplinkMessageRequest{} } +func (m *PublishUplinkMessageRequest) String() string { return proto.CompactTextString(m) } +func (*PublishUplinkMessageRequest) ProtoMessage() {} +func (*PublishUplinkMessageRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d82f572a7cd33550, []int{5} +} +func (m *PublishUplinkMessageRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PublishUplinkMessageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PublishUplinkMessageRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PublishUplinkMessageRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PublishUplinkMessageRequest.Merge(m, src) +} +func (m *PublishUplinkMessageRequest) XXX_Size() int { + return m.Size() +} +func (m *PublishUplinkMessageRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PublishUplinkMessageRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_PublishUplinkMessageRequest proto.InternalMessageInfo + +func (m *PublishUplinkMessageRequest) GetForwarderNetId() uint32 { + if m != nil { + return m.ForwarderNetId + } + return 0 +} + +func (m *PublishUplinkMessageRequest) GetForwarderId() string { + if m != nil { + return m.ForwarderId + } + return "" +} + +func (m *PublishUplinkMessageRequest) GetMessage() *UplinkMessage { + if m != nil { + return m.Message + } + return nil +} + +type PublishUplinkMessageResponse struct { + // Message identifier generated by the Router. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Delivery state of the uplink message. + State MessageDeliveryState `protobuf:"varint,2,opt,name=state,proto3,enum=org.packetbroker.v1alpha1.MessageDeliveryState" json:"state,omitempty"` +} + +func (m *PublishUplinkMessageResponse) Reset() { *m = PublishUplinkMessageResponse{} } +func (m *PublishUplinkMessageResponse) String() string { return proto.CompactTextString(m) } +func (*PublishUplinkMessageResponse) ProtoMessage() {} +func (*PublishUplinkMessageResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d82f572a7cd33550, []int{6} +} +func (m *PublishUplinkMessageResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PublishUplinkMessageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PublishUplinkMessageResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PublishUplinkMessageResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PublishUplinkMessageResponse.Merge(m, src) +} +func (m *PublishUplinkMessageResponse) XXX_Size() int { + return m.Size() +} +func (m *PublishUplinkMessageResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PublishUplinkMessageResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PublishUplinkMessageResponse proto.InternalMessageInfo + +func (m *PublishUplinkMessageResponse) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *PublishUplinkMessageResponse) GetState() MessageDeliveryState { + if m != nil { + return m.State + } + return MessageDeliveryState_ACCEPTED +} + +type PublishDownlinkMessageRequest struct { + // LoRa Alliance NetID of the Home Network Member. + HomeNetworkNetId uint32 `protobuf:"varint,1,opt,name=home_network_net_id,json=homeNetworkNetId,proto3" json:"home_network_net_id,omitempty"` + // LoRa Alliance NetID of the Forwarder Member. + ForwarderNetId uint32 `protobuf:"varint,2,opt,name=forwarder_net_id,json=forwarderNetId,proto3" json:"forwarder_net_id,omitempty"` + // Forwarder identifier issued by the Forwarder Member. + // In LoRaWAN Class A downlink, this value must be copied from the RoutedUplinkMessage. + // In LoRaWAN Class B or C downlink, this value is typically copied from a recent RoutedUplinkMessage. + ForwarderId string `protobuf:"bytes,3,opt,name=forwarder_id,json=forwarderId,proto3" json:"forwarder_id,omitempty"` + // Downlink message to publish. + Message *DownlinkMessage `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` +} + +func (m *PublishDownlinkMessageRequest) Reset() { *m = PublishDownlinkMessageRequest{} } +func (m *PublishDownlinkMessageRequest) String() string { return proto.CompactTextString(m) } +func (*PublishDownlinkMessageRequest) ProtoMessage() {} +func (*PublishDownlinkMessageRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d82f572a7cd33550, []int{7} +} +func (m *PublishDownlinkMessageRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PublishDownlinkMessageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PublishDownlinkMessageRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PublishDownlinkMessageRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PublishDownlinkMessageRequest.Merge(m, src) +} +func (m *PublishDownlinkMessageRequest) XXX_Size() int { + return m.Size() +} +func (m *PublishDownlinkMessageRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PublishDownlinkMessageRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_PublishDownlinkMessageRequest proto.InternalMessageInfo + +func (m *PublishDownlinkMessageRequest) GetHomeNetworkNetId() uint32 { + if m != nil { + return m.HomeNetworkNetId + } + return 0 +} + +func (m *PublishDownlinkMessageRequest) GetForwarderNetId() uint32 { + if m != nil { + return m.ForwarderNetId + } + return 0 +} + +func (m *PublishDownlinkMessageRequest) GetForwarderId() string { + if m != nil { + return m.ForwarderId + } + return "" +} + +func (m *PublishDownlinkMessageRequest) GetMessage() *DownlinkMessage { + if m != nil { + return m.Message + } + return nil +} + +type PublishDownlinkMessageResponse struct { + // Message identifier generated by the Router. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Delivery state of the downlink message. + State MessageDeliveryState `protobuf:"varint,2,opt,name=state,proto3,enum=org.packetbroker.v1alpha1.MessageDeliveryState" json:"state,omitempty"` +} + +func (m *PublishDownlinkMessageResponse) Reset() { *m = PublishDownlinkMessageResponse{} } +func (m *PublishDownlinkMessageResponse) String() string { return proto.CompactTextString(m) } +func (*PublishDownlinkMessageResponse) ProtoMessage() {} +func (*PublishDownlinkMessageResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d82f572a7cd33550, []int{8} +} +func (m *PublishDownlinkMessageResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PublishDownlinkMessageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PublishDownlinkMessageResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PublishDownlinkMessageResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PublishDownlinkMessageResponse.Merge(m, src) +} +func (m *PublishDownlinkMessageResponse) XXX_Size() int { + return m.Size() +} +func (m *PublishDownlinkMessageResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PublishDownlinkMessageResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PublishDownlinkMessageResponse proto.InternalMessageInfo + +func (m *PublishDownlinkMessageResponse) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *PublishDownlinkMessageResponse) GetState() MessageDeliveryState { + if m != nil { + return m.State + } + return MessageDeliveryState_ACCEPTED +} + +type SubscribeForwarderRequest struct { + // LoRa Alliance NetID of the Forwarder Member. + ForwarderNetId uint32 `protobuf:"varint,1,opt,name=forwarder_net_id,json=forwarderNetId,proto3" json:"forwarder_net_id,omitempty"` + // Forwarder identifier issued by the Forwarder Member. + ForwarderId string `protobuf:"bytes,2,opt,name=forwarder_id,json=forwarderId,proto3" json:"forwarder_id,omitempty"` + // Shared subscription group (optional). + // Queue durability depends on the Router configuration. + Group string `protobuf:"bytes,3,opt,name=group,proto3" json:"group,omitempty"` +} + +func (m *SubscribeForwarderRequest) Reset() { *m = SubscribeForwarderRequest{} } +func (m *SubscribeForwarderRequest) String() string { return proto.CompactTextString(m) } +func (*SubscribeForwarderRequest) ProtoMessage() {} +func (*SubscribeForwarderRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d82f572a7cd33550, []int{9} +} +func (m *SubscribeForwarderRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SubscribeForwarderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SubscribeForwarderRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SubscribeForwarderRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubscribeForwarderRequest.Merge(m, src) +} +func (m *SubscribeForwarderRequest) XXX_Size() int { + return m.Size() +} +func (m *SubscribeForwarderRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SubscribeForwarderRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SubscribeForwarderRequest proto.InternalMessageInfo + +func (m *SubscribeForwarderRequest) GetForwarderNetId() uint32 { + if m != nil { + return m.ForwarderNetId + } + return 0 +} + +func (m *SubscribeForwarderRequest) GetForwarderId() string { + if m != nil { + return m.ForwarderId + } + return "" +} + +func (m *SubscribeForwarderRequest) GetGroup() string { + if m != nil { + return m.Group + } + return "" +} + +type SubscribeHomeNetworkRequest struct { + // LoRa Alliance NetID of the Home Network Member. + HomeNetworkNetId uint32 `protobuf:"varint,1,opt,name=home_network_net_id,json=homeNetworkNetId,proto3" json:"home_network_net_id,omitempty"` + // Routing filters to configure the subscription. + // A message gets delivered if any of the given filters pass. + // If no filters are specified, all messages will be delivered. + Filters []*RoutingFilter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` + // Shared subscription group (optional). + // Queue durability depends on the Router configuration. + Group string `protobuf:"bytes,3,opt,name=group,proto3" json:"group,omitempty"` +} + +func (m *SubscribeHomeNetworkRequest) Reset() { *m = SubscribeHomeNetworkRequest{} } +func (m *SubscribeHomeNetworkRequest) String() string { return proto.CompactTextString(m) } +func (*SubscribeHomeNetworkRequest) ProtoMessage() {} +func (*SubscribeHomeNetworkRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d82f572a7cd33550, []int{10} +} +func (m *SubscribeHomeNetworkRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SubscribeHomeNetworkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SubscribeHomeNetworkRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SubscribeHomeNetworkRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubscribeHomeNetworkRequest.Merge(m, src) +} +func (m *SubscribeHomeNetworkRequest) XXX_Size() int { + return m.Size() +} +func (m *SubscribeHomeNetworkRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SubscribeHomeNetworkRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SubscribeHomeNetworkRequest proto.InternalMessageInfo + +func (m *SubscribeHomeNetworkRequest) GetHomeNetworkNetId() uint32 { + if m != nil { + return m.HomeNetworkNetId + } + return 0 +} + +func (m *SubscribeHomeNetworkRequest) GetFilters() []*RoutingFilter { + if m != nil { + return m.Filters + } + return nil +} + +func (m *SubscribeHomeNetworkRequest) GetGroup() string { + if m != nil { + return m.Group + } + return "" +} + +type RouteUplinkMessageRequest struct { + // Uplink message to route. + Message *RoutedUplinkMessage `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (m *RouteUplinkMessageRequest) Reset() { *m = RouteUplinkMessageRequest{} } +func (m *RouteUplinkMessageRequest) String() string { return proto.CompactTextString(m) } +func (*RouteUplinkMessageRequest) ProtoMessage() {} +func (*RouteUplinkMessageRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d82f572a7cd33550, []int{11} +} +func (m *RouteUplinkMessageRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RouteUplinkMessageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RouteUplinkMessageRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RouteUplinkMessageRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteUplinkMessageRequest.Merge(m, src) +} +func (m *RouteUplinkMessageRequest) XXX_Size() int { + return m.Size() +} +func (m *RouteUplinkMessageRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RouteUplinkMessageRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteUplinkMessageRequest proto.InternalMessageInfo + +func (m *RouteUplinkMessageRequest) GetMessage() *RoutedUplinkMessage { + if m != nil { + return m.Message + } + return nil +} + +type RouteDownlinkMessageRequest struct { + // Downlink message to route. + Message *RoutedDownlinkMessage `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (m *RouteDownlinkMessageRequest) Reset() { *m = RouteDownlinkMessageRequest{} } +func (m *RouteDownlinkMessageRequest) String() string { return proto.CompactTextString(m) } +func (*RouteDownlinkMessageRequest) ProtoMessage() {} +func (*RouteDownlinkMessageRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d82f572a7cd33550, []int{12} +} +func (m *RouteDownlinkMessageRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RouteDownlinkMessageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RouteDownlinkMessageRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RouteDownlinkMessageRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteDownlinkMessageRequest.Merge(m, src) +} +func (m *RouteDownlinkMessageRequest) XXX_Size() int { + return m.Size() +} +func (m *RouteDownlinkMessageRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RouteDownlinkMessageRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteDownlinkMessageRequest proto.InternalMessageInfo + +func (m *RouteDownlinkMessageRequest) GetMessage() *RoutedDownlinkMessage { + if m != nil { + return m.Message + } + return nil +} + +type RouteMessageResponse struct { + // Delivery state of the message. + State MessageDeliveryState `protobuf:"varint,1,opt,name=state,proto3,enum=org.packetbroker.v1alpha1.MessageDeliveryState" json:"state,omitempty"` +} + +func (m *RouteMessageResponse) Reset() { *m = RouteMessageResponse{} } +func (m *RouteMessageResponse) String() string { return proto.CompactTextString(m) } +func (*RouteMessageResponse) ProtoMessage() {} +func (*RouteMessageResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d82f572a7cd33550, []int{13} +} +func (m *RouteMessageResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RouteMessageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RouteMessageResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RouteMessageResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteMessageResponse.Merge(m, src) +} +func (m *RouteMessageResponse) XXX_Size() int { + return m.Size() +} +func (m *RouteMessageResponse) XXX_DiscardUnknown() { + xxx_messageInfo_RouteMessageResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteMessageResponse proto.InternalMessageInfo + +func (m *RouteMessageResponse) GetState() MessageDeliveryState { + if m != nil { + return m.State + } + return MessageDeliveryState_ACCEPTED +} + +func init() { + proto.RegisterType((*GetDefaultRoutingPolicyRequest)(nil), "org.packetbroker.v1alpha1.GetDefaultRoutingPolicyRequest") + proto.RegisterType((*SetDefaultRoutingPolicyRequest)(nil), "org.packetbroker.v1alpha1.SetDefaultRoutingPolicyRequest") + proto.RegisterType((*GetHomeNetworkRoutingPolicyRequest)(nil), "org.packetbroker.v1alpha1.GetHomeNetworkRoutingPolicyRequest") + proto.RegisterType((*SetHomeNetworkRoutingPolicyRequest)(nil), "org.packetbroker.v1alpha1.SetHomeNetworkRoutingPolicyRequest") + proto.RegisterType((*GetRoutingPolicyResponse)(nil), "org.packetbroker.v1alpha1.GetRoutingPolicyResponse") + proto.RegisterType((*PublishUplinkMessageRequest)(nil), "org.packetbroker.v1alpha1.PublishUplinkMessageRequest") + proto.RegisterType((*PublishUplinkMessageResponse)(nil), "org.packetbroker.v1alpha1.PublishUplinkMessageResponse") + proto.RegisterType((*PublishDownlinkMessageRequest)(nil), "org.packetbroker.v1alpha1.PublishDownlinkMessageRequest") + proto.RegisterType((*PublishDownlinkMessageResponse)(nil), "org.packetbroker.v1alpha1.PublishDownlinkMessageResponse") + proto.RegisterType((*SubscribeForwarderRequest)(nil), "org.packetbroker.v1alpha1.SubscribeForwarderRequest") + proto.RegisterType((*SubscribeHomeNetworkRequest)(nil), "org.packetbroker.v1alpha1.SubscribeHomeNetworkRequest") + proto.RegisterType((*RouteUplinkMessageRequest)(nil), "org.packetbroker.v1alpha1.RouteUplinkMessageRequest") + proto.RegisterType((*RouteDownlinkMessageRequest)(nil), "org.packetbroker.v1alpha1.RouteDownlinkMessageRequest") + proto.RegisterType((*RouteMessageResponse)(nil), "org.packetbroker.v1alpha1.RouteMessageResponse") +} + +func init() { + proto.RegisterFile("packetbroker/api/v1alpha1/routing_services.proto", fileDescriptor_d82f572a7cd33550) +} + +var fileDescriptor_d82f572a7cd33550 = []byte{ + // 843 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcf, 0x6b, 0xe3, 0x46, + 0x14, 0xce, 0xc8, 0x4d, 0x42, 0x5e, 0x9a, 0x60, 0x14, 0xb7, 0x38, 0x72, 0x2b, 0x5c, 0x41, 0xa9, + 0x29, 0x44, 0x76, 0x9c, 0x92, 0x36, 0x94, 0x42, 0x09, 0x4e, 0x9c, 0x14, 0x12, 0x82, 0x4d, 0x2f, + 0xa5, 0x25, 0xc8, 0xf6, 0xb3, 0x2c, 0x2c, 0x7b, 0xd4, 0xd1, 0x28, 0x6e, 0xa0, 0x94, 0x92, 0x63, + 0x4e, 0xed, 0x7f, 0xd0, 0x53, 0x8f, 0xbb, 0xff, 0xc6, 0x1e, 0x73, 0xdc, 0xe3, 0xae, 0xf3, 0x7f, + 0x2c, 0x8b, 0x25, 0x59, 0xfe, 0x11, 0x4b, 0xfe, 0xb1, 0x78, 0xd9, 0x4b, 0x20, 0x9a, 0x79, 0xef, + 0x7d, 0xef, 0x9b, 0xef, 0x7d, 0x33, 0x86, 0x9c, 0xa5, 0x55, 0x9b, 0xc8, 0x2b, 0x8c, 0x36, 0x91, + 0x65, 0x35, 0xcb, 0xc8, 0xde, 0xec, 0x6b, 0xa6, 0xd5, 0xd0, 0xf6, 0xb3, 0x8c, 0x3a, 0xdc, 0x68, + 0xeb, 0xd7, 0x36, 0xb2, 0x1b, 0xa3, 0x8a, 0xb6, 0x6a, 0x31, 0xca, 0xa9, 0xb8, 0x4b, 0x99, 0xae, + 0x0e, 0x47, 0xa9, 0xfd, 0x08, 0x29, 0xa5, 0x53, 0xaa, 0x9b, 0x98, 0x75, 0x37, 0x56, 0x9c, 0x7a, + 0x16, 0x5b, 0x16, 0xbf, 0xf5, 0xe2, 0xa4, 0x2f, 0xc3, 0x2b, 0x61, 0xdb, 0x69, 0xf9, 0xe9, 0xa5, + 0x4c, 0xf8, 0xb6, 0x16, 0xda, 0xb6, 0xa6, 0xf7, 0x81, 0x48, 0x5f, 0x4d, 0x85, 0xee, 0x6d, 0x54, + 0x5a, 0x20, 0x17, 0x91, 0x17, 0xb0, 0xae, 0x39, 0x26, 0x2f, 0x79, 0x4b, 0x57, 0xd4, 0x34, 0xaa, + 0xb7, 0x25, 0xfc, 0xdd, 0x41, 0x9b, 0x8b, 0x19, 0x88, 0xd7, 0x29, 0xeb, 0x68, 0xac, 0x86, 0xec, + 0xba, 0x8d, 0xfc, 0xda, 0xa8, 0x25, 0x49, 0x9a, 0x64, 0xb6, 0x4a, 0xdb, 0xc1, 0xf7, 0x4b, 0xe4, + 0xe7, 0x35, 0xf1, 0x0b, 0xf8, 0x78, 0xb0, 0xd3, 0xa8, 0x25, 0x85, 0x34, 0xc9, 0x6c, 0x94, 0x36, + 0x83, 0x6f, 0xe7, 0x35, 0xe5, 0x39, 0x01, 0xb9, 0xfc, 0xfe, 0xea, 0x89, 0x3f, 0xc2, 0x9a, 0xe5, + 0x66, 0x4f, 0xc6, 0xd2, 0x24, 0xb3, 0x99, 0xcf, 0xa8, 0xa1, 0x27, 0xa4, 0x8e, 0xa2, 0xf1, 0xe3, + 0x94, 0xff, 0x08, 0x28, 0x45, 0xe4, 0x67, 0xb4, 0x85, 0x97, 0xc8, 0x3b, 0x94, 0x35, 0x97, 0x8f, + 0x7a, 0x0f, 0x76, 0x1a, 0xb4, 0x85, 0xbd, 0x3c, 0xbd, 0x82, 0xfd, 0x7c, 0x31, 0x37, 0x5f, 0xbc, + 0x31, 0x80, 0xe2, 0x66, 0x54, 0xba, 0x04, 0x94, 0xf2, 0x07, 0x0d, 0x71, 0xe8, 0x1c, 0x3e, 0x5a, + 0xf0, 0x1c, 0x7e, 0x85, 0x64, 0x11, 0xc7, 0x15, 0x63, 0x5b, 0xb4, 0x6d, 0xe3, 0x50, 0x76, 0xb2, + 0x60, 0xf6, 0x67, 0x04, 0x52, 0x57, 0x4e, 0xc5, 0x34, 0xec, 0xc6, 0xcf, 0x96, 0x69, 0xb4, 0x9b, + 0x17, 0xde, 0x3c, 0x2d, 0x85, 0xbb, 0x63, 0x58, 0xf7, 0xc7, 0x75, 0x06, 0x55, 0x8e, 0xc2, 0xe9, + 0x07, 0x2a, 0x0e, 0x7c, 0x36, 0x19, 0xaf, 0x4f, 0xc9, 0x36, 0x08, 0x3e, 0xc4, 0x8d, 0x92, 0x60, + 0xd4, 0xc4, 0x13, 0x58, 0xb5, 0xb9, 0xc6, 0xd1, 0xc5, 0xb3, 0x9d, 0xcf, 0x46, 0x54, 0xf4, 0x53, + 0x15, 0xd0, 0x34, 0x6e, 0x90, 0xdd, 0x96, 0x7b, 0x61, 0x25, 0x2f, 0x5a, 0x79, 0x4d, 0xe0, 0x73, + 0xbf, 0x6e, 0x81, 0x76, 0xda, 0x13, 0x98, 0x0a, 0x11, 0x06, 0x09, 0x11, 0xc6, 0x24, 0x62, 0x85, + 0x99, 0x88, 0x8d, 0x3d, 0x25, 0xb6, 0x30, 0x20, 0xd6, 0x93, 0xd9, 0xd7, 0x11, 0x6d, 0x8e, 0xe3, + 0x0f, 0xa8, 0xed, 0x80, 0x1c, 0xd6, 0xe2, 0x72, 0xc9, 0xfd, 0x0b, 0x76, 0xcb, 0x4e, 0xc5, 0xae, + 0x32, 0xa3, 0x82, 0xa7, 0xfd, 0xb6, 0x96, 0xa2, 0xc0, 0x04, 0xac, 0xea, 0x8c, 0x3a, 0x96, 0x4f, + 0xa2, 0xf7, 0x8f, 0xf2, 0x3f, 0x81, 0x54, 0x00, 0x60, 0xd8, 0x4d, 0x16, 0x3b, 0xda, 0x63, 0x58, + 0xaf, 0x1b, 0x26, 0x47, 0x66, 0x27, 0x85, 0x74, 0x6c, 0xb6, 0xb1, 0x3c, 0x75, 0x03, 0x4a, 0xfd, + 0xc0, 0x10, 0xa0, 0x08, 0xbb, 0xbd, 0xfd, 0x38, 0x71, 0x54, 0xcf, 0x06, 0x22, 0xf0, 0xdc, 0x40, + 0x9d, 0x52, 0x16, 0x6b, 0x21, 0x33, 0x66, 0x40, 0xca, 0x5d, 0x0f, 0x51, 0xfa, 0x4f, 0xe3, 0x85, + 0x72, 0x53, 0x0b, 0x85, 0x6a, 0xee, 0x37, 0x48, 0xb8, 0x3b, 0xc6, 0x95, 0x16, 0x28, 0x8b, 0xbc, + 0x8b, 0xb2, 0xf2, 0x6f, 0x62, 0x5e, 0xfe, 0xc0, 0xf8, 0x2e, 0xb4, 0xb6, 0xa6, 0x23, 0x13, 0xef, + 0x08, 0xc4, 0x07, 0xf7, 0xbf, 0xb7, 0x26, 0x1e, 0x45, 0x54, 0x89, 0x7e, 0x2c, 0x48, 0x07, 0xd1, + 0xa1, 0x93, 0xed, 0x1b, 0x21, 0x5e, 0x9e, 0x07, 0x43, 0xf4, 0x03, 0x42, 0xfa, 0x54, 0xf5, 0x9e, + 0x5a, 0x6a, 0xff, 0xa9, 0xa5, 0x9e, 0xf4, 0x9e, 0x5a, 0xe2, 0x3d, 0x81, 0xc4, 0xe8, 0x4d, 0xee, + 0xd7, 0xfa, 0x21, 0x1a, 0xf4, 0x94, 0x7b, 0x75, 0xb1, 0x9e, 0x5b, 0x90, 0x28, 0xcf, 0x8b, 0x65, + 0xfa, 0x1d, 0x1f, 0xd6, 0x7b, 0xfe, 0x5e, 0x80, 0x1d, 0x57, 0x60, 0x2c, 0x30, 0x96, 0x82, 0xc6, + 0x35, 0xf1, 0x4f, 0x58, 0xf7, 0xbd, 0x4e, 0x3c, 0x8c, 0xa8, 0x1c, 0x71, 0x35, 0x4a, 0xdf, 0xce, + 0x1d, 0xe7, 0x51, 0x90, 0x23, 0xa2, 0x03, 0x1b, 0x81, 0xdf, 0x88, 0xdf, 0x44, 0x75, 0x1e, 0x66, + 0x8b, 0xd2, 0xdc, 0x33, 0x97, 0x23, 0xf9, 0x7f, 0x05, 0xf8, 0xc4, 0x23, 0x63, 0x88, 0x4e, 0x97, + 0x8e, 0xbf, 0xc9, 0x80, 0x8f, 0xef, 0xa6, 0xf7, 0x35, 0xd9, 0x18, 0xa4, 0xa3, 0x05, 0x22, 0x27, + 0x73, 0x72, 0x38, 0x0b, 0x27, 0x4f, 0x9d, 0x5a, 0x9a, 0xd3, 0xf2, 0x72, 0x24, 0x7f, 0x27, 0x40, + 0xdc, 0xe3, 0xc4, 0xfb, 0xeb, 0xd2, 0xc1, 0x61, 0x73, 0xc8, 0x67, 0x23, 0x4f, 0x28, 0xd4, 0x8f, + 0xa5, 0xec, 0xb4, 0xa8, 0x71, 0xcf, 0xfb, 0x03, 0xb6, 0x46, 0x6c, 0x37, 0x92, 0x85, 0x08, 0x83, + 0x9e, 0xbb, 0xf2, 0x71, 0xf1, 0x45, 0x57, 0x26, 0x0f, 0x5d, 0x99, 0xbc, 0xea, 0xca, 0xe4, 0x9f, + 0x47, 0x79, 0xe5, 0xe1, 0x51, 0x5e, 0x79, 0xf9, 0x28, 0xaf, 0xfc, 0xb2, 0xa7, 0xd3, 0xd1, 0x44, + 0x94, 0xe9, 0x23, 0x3f, 0xab, 0xbe, 0x1f, 0x5e, 0xad, 0xac, 0xb9, 0xe3, 0x77, 0xf0, 0x36, 0x00, + 0x00, 0xff, 0xff, 0x80, 0xa2, 0x74, 0x7d, 0x42, 0x0e, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// RoutingPolicyManagerClient is the client API for RoutingPolicyManager service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type RoutingPolicyManagerClient interface { + // Get the Default Routing Policy. + GetDefaultPolicy(ctx context.Context, in *GetDefaultRoutingPolicyRequest, opts ...grpc.CallOption) (*GetRoutingPolicyResponse, error) + // Set the Default Routing Policy. + SetDefaultPolicy(ctx context.Context, in *SetDefaultRoutingPolicyRequest, opts ...grpc.CallOption) (*types.Empty, error) + // Get the Routing Policy with the Home Network. + GetHomeNetworkPolicy(ctx context.Context, in *GetHomeNetworkRoutingPolicyRequest, opts ...grpc.CallOption) (*GetRoutingPolicyResponse, error) + // Set the Routing Policy with the Home Network. + SetHomeNetworkPolicy(ctx context.Context, in *SetHomeNetworkRoutingPolicyRequest, opts ...grpc.CallOption) (*types.Empty, error) +} + +type routingPolicyManagerClient struct { + cc *grpc.ClientConn +} + +func NewRoutingPolicyManagerClient(cc *grpc.ClientConn) RoutingPolicyManagerClient { + return &routingPolicyManagerClient{cc} +} + +func (c *routingPolicyManagerClient) GetDefaultPolicy(ctx context.Context, in *GetDefaultRoutingPolicyRequest, opts ...grpc.CallOption) (*GetRoutingPolicyResponse, error) { + out := new(GetRoutingPolicyResponse) + err := c.cc.Invoke(ctx, "/org.packetbroker.v1alpha1.RoutingPolicyManager/GetDefaultPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *routingPolicyManagerClient) SetDefaultPolicy(ctx context.Context, in *SetDefaultRoutingPolicyRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/org.packetbroker.v1alpha1.RoutingPolicyManager/SetDefaultPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *routingPolicyManagerClient) GetHomeNetworkPolicy(ctx context.Context, in *GetHomeNetworkRoutingPolicyRequest, opts ...grpc.CallOption) (*GetRoutingPolicyResponse, error) { + out := new(GetRoutingPolicyResponse) + err := c.cc.Invoke(ctx, "/org.packetbroker.v1alpha1.RoutingPolicyManager/GetHomeNetworkPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *routingPolicyManagerClient) SetHomeNetworkPolicy(ctx context.Context, in *SetHomeNetworkRoutingPolicyRequest, opts ...grpc.CallOption) (*types.Empty, error) { + out := new(types.Empty) + err := c.cc.Invoke(ctx, "/org.packetbroker.v1alpha1.RoutingPolicyManager/SetHomeNetworkPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RoutingPolicyManagerServer is the server API for RoutingPolicyManager service. +type RoutingPolicyManagerServer interface { + // Get the Default Routing Policy. + GetDefaultPolicy(context.Context, *GetDefaultRoutingPolicyRequest) (*GetRoutingPolicyResponse, error) + // Set the Default Routing Policy. + SetDefaultPolicy(context.Context, *SetDefaultRoutingPolicyRequest) (*types.Empty, error) + // Get the Routing Policy with the Home Network. + GetHomeNetworkPolicy(context.Context, *GetHomeNetworkRoutingPolicyRequest) (*GetRoutingPolicyResponse, error) + // Set the Routing Policy with the Home Network. + SetHomeNetworkPolicy(context.Context, *SetHomeNetworkRoutingPolicyRequest) (*types.Empty, error) +} + +// UnimplementedRoutingPolicyManagerServer can be embedded to have forward compatible implementations. +type UnimplementedRoutingPolicyManagerServer struct { +} + +func (*UnimplementedRoutingPolicyManagerServer) GetDefaultPolicy(ctx context.Context, req *GetDefaultRoutingPolicyRequest) (*GetRoutingPolicyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDefaultPolicy not implemented") +} +func (*UnimplementedRoutingPolicyManagerServer) SetDefaultPolicy(ctx context.Context, req *SetDefaultRoutingPolicyRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetDefaultPolicy not implemented") +} +func (*UnimplementedRoutingPolicyManagerServer) GetHomeNetworkPolicy(ctx context.Context, req *GetHomeNetworkRoutingPolicyRequest) (*GetRoutingPolicyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetHomeNetworkPolicy not implemented") +} +func (*UnimplementedRoutingPolicyManagerServer) SetHomeNetworkPolicy(ctx context.Context, req *SetHomeNetworkRoutingPolicyRequest) (*types.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetHomeNetworkPolicy not implemented") +} + +func RegisterRoutingPolicyManagerServer(s *grpc.Server, srv RoutingPolicyManagerServer) { + s.RegisterService(&_RoutingPolicyManager_serviceDesc, srv) +} + +func _RoutingPolicyManager_GetDefaultPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDefaultRoutingPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RoutingPolicyManagerServer).GetDefaultPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/org.packetbroker.v1alpha1.RoutingPolicyManager/GetDefaultPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RoutingPolicyManagerServer).GetDefaultPolicy(ctx, req.(*GetDefaultRoutingPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RoutingPolicyManager_SetDefaultPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetDefaultRoutingPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RoutingPolicyManagerServer).SetDefaultPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/org.packetbroker.v1alpha1.RoutingPolicyManager/SetDefaultPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RoutingPolicyManagerServer).SetDefaultPolicy(ctx, req.(*SetDefaultRoutingPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RoutingPolicyManager_GetHomeNetworkPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetHomeNetworkRoutingPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RoutingPolicyManagerServer).GetHomeNetworkPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/org.packetbroker.v1alpha1.RoutingPolicyManager/GetHomeNetworkPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RoutingPolicyManagerServer).GetHomeNetworkPolicy(ctx, req.(*GetHomeNetworkRoutingPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RoutingPolicyManager_SetHomeNetworkPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetHomeNetworkRoutingPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RoutingPolicyManagerServer).SetHomeNetworkPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/org.packetbroker.v1alpha1.RoutingPolicyManager/SetHomeNetworkPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RoutingPolicyManagerServer).SetHomeNetworkPolicy(ctx, req.(*SetHomeNetworkRoutingPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _RoutingPolicyManager_serviceDesc = grpc.ServiceDesc{ + ServiceName: "org.packetbroker.v1alpha1.RoutingPolicyManager", + HandlerType: (*RoutingPolicyManagerServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetDefaultPolicy", + Handler: _RoutingPolicyManager_GetDefaultPolicy_Handler, + }, + { + MethodName: "SetDefaultPolicy", + Handler: _RoutingPolicyManager_SetDefaultPolicy_Handler, + }, + { + MethodName: "GetHomeNetworkPolicy", + Handler: _RoutingPolicyManager_GetHomeNetworkPolicy_Handler, + }, + { + MethodName: "SetHomeNetworkPolicy", + Handler: _RoutingPolicyManager_SetHomeNetworkPolicy_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "packetbroker/api/v1alpha1/routing_services.proto", +} + +// RouterForwarderDataClient is the client API for RouterForwarderData service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type RouterForwarderDataClient interface { + // Publish an uplink message. The return stream provides state updates of the message. + // The server can close the stream at any time if there are no more updates available. + Publish(ctx context.Context, in *PublishUplinkMessageRequest, opts ...grpc.CallOption) (RouterForwarderData_PublishClient, error) + // Subscribe to routed downlink messages. + Subscribe(ctx context.Context, in *SubscribeForwarderRequest, opts ...grpc.CallOption) (RouterForwarderData_SubscribeClient, error) +} + +type routerForwarderDataClient struct { + cc *grpc.ClientConn +} + +func NewRouterForwarderDataClient(cc *grpc.ClientConn) RouterForwarderDataClient { + return &routerForwarderDataClient{cc} +} + +func (c *routerForwarderDataClient) Publish(ctx context.Context, in *PublishUplinkMessageRequest, opts ...grpc.CallOption) (RouterForwarderData_PublishClient, error) { + stream, err := c.cc.NewStream(ctx, &_RouterForwarderData_serviceDesc.Streams[0], "/org.packetbroker.v1alpha1.RouterForwarderData/Publish", opts...) + if err != nil { + return nil, err + } + x := &routerForwarderDataPublishClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type RouterForwarderData_PublishClient interface { + Recv() (*PublishUplinkMessageResponse, error) + grpc.ClientStream +} + +type routerForwarderDataPublishClient struct { + grpc.ClientStream +} + +func (x *routerForwarderDataPublishClient) Recv() (*PublishUplinkMessageResponse, error) { + m := new(PublishUplinkMessageResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *routerForwarderDataClient) Subscribe(ctx context.Context, in *SubscribeForwarderRequest, opts ...grpc.CallOption) (RouterForwarderData_SubscribeClient, error) { + stream, err := c.cc.NewStream(ctx, &_RouterForwarderData_serviceDesc.Streams[1], "/org.packetbroker.v1alpha1.RouterForwarderData/Subscribe", opts...) + if err != nil { + return nil, err + } + x := &routerForwarderDataSubscribeClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type RouterForwarderData_SubscribeClient interface { + Recv() (*RoutedDownlinkMessage, error) + grpc.ClientStream +} + +type routerForwarderDataSubscribeClient struct { + grpc.ClientStream +} + +func (x *routerForwarderDataSubscribeClient) Recv() (*RoutedDownlinkMessage, error) { + m := new(RoutedDownlinkMessage) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// RouterForwarderDataServer is the server API for RouterForwarderData service. +type RouterForwarderDataServer interface { + // Publish an uplink message. The return stream provides state updates of the message. + // The server can close the stream at any time if there are no more updates available. + Publish(*PublishUplinkMessageRequest, RouterForwarderData_PublishServer) error + // Subscribe to routed downlink messages. + Subscribe(*SubscribeForwarderRequest, RouterForwarderData_SubscribeServer) error +} + +// UnimplementedRouterForwarderDataServer can be embedded to have forward compatible implementations. +type UnimplementedRouterForwarderDataServer struct { +} + +func (*UnimplementedRouterForwarderDataServer) Publish(req *PublishUplinkMessageRequest, srv RouterForwarderData_PublishServer) error { + return status.Errorf(codes.Unimplemented, "method Publish not implemented") +} +func (*UnimplementedRouterForwarderDataServer) Subscribe(req *SubscribeForwarderRequest, srv RouterForwarderData_SubscribeServer) error { + return status.Errorf(codes.Unimplemented, "method Subscribe not implemented") +} + +func RegisterRouterForwarderDataServer(s *grpc.Server, srv RouterForwarderDataServer) { + s.RegisterService(&_RouterForwarderData_serviceDesc, srv) +} + +func _RouterForwarderData_Publish_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(PublishUplinkMessageRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(RouterForwarderDataServer).Publish(m, &routerForwarderDataPublishServer{stream}) +} + +type RouterForwarderData_PublishServer interface { + Send(*PublishUplinkMessageResponse) error + grpc.ServerStream +} + +type routerForwarderDataPublishServer struct { + grpc.ServerStream +} + +func (x *routerForwarderDataPublishServer) Send(m *PublishUplinkMessageResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _RouterForwarderData_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SubscribeForwarderRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(RouterForwarderDataServer).Subscribe(m, &routerForwarderDataSubscribeServer{stream}) +} + +type RouterForwarderData_SubscribeServer interface { + Send(*RoutedDownlinkMessage) error + grpc.ServerStream +} + +type routerForwarderDataSubscribeServer struct { + grpc.ServerStream +} + +func (x *routerForwarderDataSubscribeServer) Send(m *RoutedDownlinkMessage) error { + return x.ServerStream.SendMsg(m) +} + +var _RouterForwarderData_serviceDesc = grpc.ServiceDesc{ + ServiceName: "org.packetbroker.v1alpha1.RouterForwarderData", + HandlerType: (*RouterForwarderDataServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "Publish", + Handler: _RouterForwarderData_Publish_Handler, + ServerStreams: true, + }, + { + StreamName: "Subscribe", + Handler: _RouterForwarderData_Subscribe_Handler, + ServerStreams: true, + }, + }, + Metadata: "packetbroker/api/v1alpha1/routing_services.proto", +} + +// RouterHomeNetworkDataClient is the client API for RouterHomeNetworkData service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type RouterHomeNetworkDataClient interface { + // Publish a downlink message. The return stream provides state updates of the message. + // The server can close the stream at any time if there are no more updates available. + Publish(ctx context.Context, in *PublishDownlinkMessageRequest, opts ...grpc.CallOption) (RouterHomeNetworkData_PublishClient, error) + // Subscribe to routed uplink messages. + Subscribe(ctx context.Context, in *SubscribeHomeNetworkRequest, opts ...grpc.CallOption) (RouterHomeNetworkData_SubscribeClient, error) +} + +type routerHomeNetworkDataClient struct { + cc *grpc.ClientConn +} + +func NewRouterHomeNetworkDataClient(cc *grpc.ClientConn) RouterHomeNetworkDataClient { + return &routerHomeNetworkDataClient{cc} +} + +func (c *routerHomeNetworkDataClient) Publish(ctx context.Context, in *PublishDownlinkMessageRequest, opts ...grpc.CallOption) (RouterHomeNetworkData_PublishClient, error) { + stream, err := c.cc.NewStream(ctx, &_RouterHomeNetworkData_serviceDesc.Streams[0], "/org.packetbroker.v1alpha1.RouterHomeNetworkData/Publish", opts...) + if err != nil { + return nil, err + } + x := &routerHomeNetworkDataPublishClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type RouterHomeNetworkData_PublishClient interface { + Recv() (*PublishDownlinkMessageResponse, error) + grpc.ClientStream +} + +type routerHomeNetworkDataPublishClient struct { + grpc.ClientStream +} + +func (x *routerHomeNetworkDataPublishClient) Recv() (*PublishDownlinkMessageResponse, error) { + m := new(PublishDownlinkMessageResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *routerHomeNetworkDataClient) Subscribe(ctx context.Context, in *SubscribeHomeNetworkRequest, opts ...grpc.CallOption) (RouterHomeNetworkData_SubscribeClient, error) { + stream, err := c.cc.NewStream(ctx, &_RouterHomeNetworkData_serviceDesc.Streams[1], "/org.packetbroker.v1alpha1.RouterHomeNetworkData/Subscribe", opts...) + if err != nil { + return nil, err + } + x := &routerHomeNetworkDataSubscribeClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type RouterHomeNetworkData_SubscribeClient interface { + Recv() (*RoutedUplinkMessage, error) + grpc.ClientStream +} + +type routerHomeNetworkDataSubscribeClient struct { + grpc.ClientStream +} + +func (x *routerHomeNetworkDataSubscribeClient) Recv() (*RoutedUplinkMessage, error) { + m := new(RoutedUplinkMessage) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// RouterHomeNetworkDataServer is the server API for RouterHomeNetworkData service. +type RouterHomeNetworkDataServer interface { + // Publish a downlink message. The return stream provides state updates of the message. + // The server can close the stream at any time if there are no more updates available. + Publish(*PublishDownlinkMessageRequest, RouterHomeNetworkData_PublishServer) error + // Subscribe to routed uplink messages. + Subscribe(*SubscribeHomeNetworkRequest, RouterHomeNetworkData_SubscribeServer) error +} + +// UnimplementedRouterHomeNetworkDataServer can be embedded to have forward compatible implementations. +type UnimplementedRouterHomeNetworkDataServer struct { +} + +func (*UnimplementedRouterHomeNetworkDataServer) Publish(req *PublishDownlinkMessageRequest, srv RouterHomeNetworkData_PublishServer) error { + return status.Errorf(codes.Unimplemented, "method Publish not implemented") +} +func (*UnimplementedRouterHomeNetworkDataServer) Subscribe(req *SubscribeHomeNetworkRequest, srv RouterHomeNetworkData_SubscribeServer) error { + return status.Errorf(codes.Unimplemented, "method Subscribe not implemented") +} + +func RegisterRouterHomeNetworkDataServer(s *grpc.Server, srv RouterHomeNetworkDataServer) { + s.RegisterService(&_RouterHomeNetworkData_serviceDesc, srv) +} + +func _RouterHomeNetworkData_Publish_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(PublishDownlinkMessageRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(RouterHomeNetworkDataServer).Publish(m, &routerHomeNetworkDataPublishServer{stream}) +} + +type RouterHomeNetworkData_PublishServer interface { + Send(*PublishDownlinkMessageResponse) error + grpc.ServerStream +} + +type routerHomeNetworkDataPublishServer struct { + grpc.ServerStream +} + +func (x *routerHomeNetworkDataPublishServer) Send(m *PublishDownlinkMessageResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _RouterHomeNetworkData_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SubscribeHomeNetworkRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(RouterHomeNetworkDataServer).Subscribe(m, &routerHomeNetworkDataSubscribeServer{stream}) +} + +type RouterHomeNetworkData_SubscribeServer interface { + Send(*RoutedUplinkMessage) error + grpc.ServerStream +} + +type routerHomeNetworkDataSubscribeServer struct { + grpc.ServerStream +} + +func (x *routerHomeNetworkDataSubscribeServer) Send(m *RoutedUplinkMessage) error { + return x.ServerStream.SendMsg(m) +} + +var _RouterHomeNetworkData_serviceDesc = grpc.ServiceDesc{ + ServiceName: "org.packetbroker.v1alpha1.RouterHomeNetworkData", + HandlerType: (*RouterHomeNetworkDataServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "Publish", + Handler: _RouterHomeNetworkData_Publish_Handler, + ServerStreams: true, + }, + { + StreamName: "Subscribe", + Handler: _RouterHomeNetworkData_Subscribe_Handler, + ServerStreams: true, + }, + }, + Metadata: "packetbroker/api/v1alpha1/routing_services.proto", +} + +// RouterRouterDataClient is the client API for RouterRouterData service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type RouterRouterDataClient interface { + // Route an uplink message. + RouteUplink(ctx context.Context, in *RouteUplinkMessageRequest, opts ...grpc.CallOption) (*RouteMessageResponse, error) + // Route a downlink message. + RouteDownlink(ctx context.Context, in *RouteDownlinkMessageRequest, opts ...grpc.CallOption) (*RouteMessageResponse, error) +} + +type routerRouterDataClient struct { + cc *grpc.ClientConn +} + +func NewRouterRouterDataClient(cc *grpc.ClientConn) RouterRouterDataClient { + return &routerRouterDataClient{cc} +} + +func (c *routerRouterDataClient) RouteUplink(ctx context.Context, in *RouteUplinkMessageRequest, opts ...grpc.CallOption) (*RouteMessageResponse, error) { + out := new(RouteMessageResponse) + err := c.cc.Invoke(ctx, "/org.packetbroker.v1alpha1.RouterRouterData/RouteUplink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *routerRouterDataClient) RouteDownlink(ctx context.Context, in *RouteDownlinkMessageRequest, opts ...grpc.CallOption) (*RouteMessageResponse, error) { + out := new(RouteMessageResponse) + err := c.cc.Invoke(ctx, "/org.packetbroker.v1alpha1.RouterRouterData/RouteDownlink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RouterRouterDataServer is the server API for RouterRouterData service. +type RouterRouterDataServer interface { + // Route an uplink message. + RouteUplink(context.Context, *RouteUplinkMessageRequest) (*RouteMessageResponse, error) + // Route a downlink message. + RouteDownlink(context.Context, *RouteDownlinkMessageRequest) (*RouteMessageResponse, error) +} + +// UnimplementedRouterRouterDataServer can be embedded to have forward compatible implementations. +type UnimplementedRouterRouterDataServer struct { +} + +func (*UnimplementedRouterRouterDataServer) RouteUplink(ctx context.Context, req *RouteUplinkMessageRequest) (*RouteMessageResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RouteUplink not implemented") +} +func (*UnimplementedRouterRouterDataServer) RouteDownlink(ctx context.Context, req *RouteDownlinkMessageRequest) (*RouteMessageResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RouteDownlink not implemented") +} + +func RegisterRouterRouterDataServer(s *grpc.Server, srv RouterRouterDataServer) { + s.RegisterService(&_RouterRouterData_serviceDesc, srv) +} + +func _RouterRouterData_RouteUplink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RouteUplinkMessageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RouterRouterDataServer).RouteUplink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/org.packetbroker.v1alpha1.RouterRouterData/RouteUplink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RouterRouterDataServer).RouteUplink(ctx, req.(*RouteUplinkMessageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RouterRouterData_RouteDownlink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RouteDownlinkMessageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RouterRouterDataServer).RouteDownlink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/org.packetbroker.v1alpha1.RouterRouterData/RouteDownlink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RouterRouterDataServer).RouteDownlink(ctx, req.(*RouteDownlinkMessageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _RouterRouterData_serviceDesc = grpc.ServiceDesc{ + ServiceName: "org.packetbroker.v1alpha1.RouterRouterData", + HandlerType: (*RouterRouterDataServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RouteUplink", + Handler: _RouterRouterData_RouteUplink_Handler, + }, + { + MethodName: "RouteDownlink", + Handler: _RouterRouterData_RouteDownlink_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "packetbroker/api/v1alpha1/routing_services.proto", +} + +func (m *GetDefaultRoutingPolicyRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetDefaultRoutingPolicyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetDefaultRoutingPolicyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ForwarderId) > 0 { + i -= len(m.ForwarderId) + copy(dAtA[i:], m.ForwarderId) + i = encodeVarintRoutingServices(dAtA, i, uint64(len(m.ForwarderId))) + i-- + dAtA[i] = 0x12 + } + if m.ForwarderNetId != 0 { + i = encodeVarintRoutingServices(dAtA, i, uint64(m.ForwarderNetId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SetDefaultRoutingPolicyRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SetDefaultRoutingPolicyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SetDefaultRoutingPolicyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Policy != nil { + { + size, err := m.Policy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRoutingServices(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.ForwarderId) > 0 { + i -= len(m.ForwarderId) + copy(dAtA[i:], m.ForwarderId) + i = encodeVarintRoutingServices(dAtA, i, uint64(len(m.ForwarderId))) + i-- + dAtA[i] = 0x12 + } + if m.ForwarderNetId != 0 { + i = encodeVarintRoutingServices(dAtA, i, uint64(m.ForwarderNetId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GetHomeNetworkRoutingPolicyRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetHomeNetworkRoutingPolicyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetHomeNetworkRoutingPolicyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.HomeNetworkNetId != 0 { + i = encodeVarintRoutingServices(dAtA, i, uint64(m.HomeNetworkNetId)) + i-- + dAtA[i] = 0x18 + } + if len(m.ForwarderId) > 0 { + i -= len(m.ForwarderId) + copy(dAtA[i:], m.ForwarderId) + i = encodeVarintRoutingServices(dAtA, i, uint64(len(m.ForwarderId))) + i-- + dAtA[i] = 0x12 + } + if m.ForwarderNetId != 0 { + i = encodeVarintRoutingServices(dAtA, i, uint64(m.ForwarderNetId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SetHomeNetworkRoutingPolicyRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SetHomeNetworkRoutingPolicyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SetHomeNetworkRoutingPolicyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Policy != nil { + { + size, err := m.Policy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRoutingServices(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.HomeNetworkNetId != 0 { + i = encodeVarintRoutingServices(dAtA, i, uint64(m.HomeNetworkNetId)) + i-- + dAtA[i] = 0x18 + } + if len(m.ForwarderId) > 0 { + i -= len(m.ForwarderId) + copy(dAtA[i:], m.ForwarderId) + i = encodeVarintRoutingServices(dAtA, i, uint64(len(m.ForwarderId))) + i-- + dAtA[i] = 0x12 + } + if m.ForwarderNetId != 0 { + i = encodeVarintRoutingServices(dAtA, i, uint64(m.ForwarderNetId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GetRoutingPolicyResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetRoutingPolicyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetRoutingPolicyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Policy != nil { + { + size, err := m.Policy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRoutingServices(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PublishUplinkMessageRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PublishUplinkMessageRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PublishUplinkMessageRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Message != nil { + { + size, err := m.Message.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRoutingServices(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.ForwarderId) > 0 { + i -= len(m.ForwarderId) + copy(dAtA[i:], m.ForwarderId) + i = encodeVarintRoutingServices(dAtA, i, uint64(len(m.ForwarderId))) + i-- + dAtA[i] = 0x12 + } + if m.ForwarderNetId != 0 { + i = encodeVarintRoutingServices(dAtA, i, uint64(m.ForwarderNetId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *PublishUplinkMessageResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PublishUplinkMessageResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PublishUplinkMessageResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.State != 0 { + i = encodeVarintRoutingServices(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintRoutingServices(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PublishDownlinkMessageRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PublishDownlinkMessageRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PublishDownlinkMessageRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Message != nil { + { + size, err := m.Message.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRoutingServices(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.ForwarderId) > 0 { + i -= len(m.ForwarderId) + copy(dAtA[i:], m.ForwarderId) + i = encodeVarintRoutingServices(dAtA, i, uint64(len(m.ForwarderId))) + i-- + dAtA[i] = 0x1a + } + if m.ForwarderNetId != 0 { + i = encodeVarintRoutingServices(dAtA, i, uint64(m.ForwarderNetId)) + i-- + dAtA[i] = 0x10 + } + if m.HomeNetworkNetId != 0 { + i = encodeVarintRoutingServices(dAtA, i, uint64(m.HomeNetworkNetId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *PublishDownlinkMessageResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PublishDownlinkMessageResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PublishDownlinkMessageResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.State != 0 { + i = encodeVarintRoutingServices(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintRoutingServices(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SubscribeForwarderRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SubscribeForwarderRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SubscribeForwarderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Group) > 0 { + i -= len(m.Group) + copy(dAtA[i:], m.Group) + i = encodeVarintRoutingServices(dAtA, i, uint64(len(m.Group))) + i-- + dAtA[i] = 0x1a + } + if len(m.ForwarderId) > 0 { + i -= len(m.ForwarderId) + copy(dAtA[i:], m.ForwarderId) + i = encodeVarintRoutingServices(dAtA, i, uint64(len(m.ForwarderId))) + i-- + dAtA[i] = 0x12 + } + if m.ForwarderNetId != 0 { + i = encodeVarintRoutingServices(dAtA, i, uint64(m.ForwarderNetId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SubscribeHomeNetworkRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SubscribeHomeNetworkRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SubscribeHomeNetworkRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Group) > 0 { + i -= len(m.Group) + copy(dAtA[i:], m.Group) + i = encodeVarintRoutingServices(dAtA, i, uint64(len(m.Group))) + i-- + dAtA[i] = 0x1a + } + if len(m.Filters) > 0 { + for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Filters[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRoutingServices(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.HomeNetworkNetId != 0 { + i = encodeVarintRoutingServices(dAtA, i, uint64(m.HomeNetworkNetId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RouteUplinkMessageRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RouteUplinkMessageRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RouteUplinkMessageRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Message != nil { + { + size, err := m.Message.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRoutingServices(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RouteDownlinkMessageRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RouteDownlinkMessageRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RouteDownlinkMessageRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Message != nil { + { + size, err := m.Message.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRoutingServices(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RouteMessageResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RouteMessageResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RouteMessageResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.State != 0 { + i = encodeVarintRoutingServices(dAtA, i, uint64(m.State)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintRoutingServices(dAtA []byte, offset int, v uint64) int { + offset -= sovRoutingServices(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GetDefaultRoutingPolicyRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ForwarderNetId != 0 { + n += 1 + sovRoutingServices(uint64(m.ForwarderNetId)) + } + l = len(m.ForwarderId) + if l > 0 { + n += 1 + l + sovRoutingServices(uint64(l)) + } + return n +} + +func (m *SetDefaultRoutingPolicyRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ForwarderNetId != 0 { + n += 1 + sovRoutingServices(uint64(m.ForwarderNetId)) + } + l = len(m.ForwarderId) + if l > 0 { + n += 1 + l + sovRoutingServices(uint64(l)) + } + if m.Policy != nil { + l = m.Policy.Size() + n += 1 + l + sovRoutingServices(uint64(l)) + } + return n +} + +func (m *GetHomeNetworkRoutingPolicyRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ForwarderNetId != 0 { + n += 1 + sovRoutingServices(uint64(m.ForwarderNetId)) + } + l = len(m.ForwarderId) + if l > 0 { + n += 1 + l + sovRoutingServices(uint64(l)) + } + if m.HomeNetworkNetId != 0 { + n += 1 + sovRoutingServices(uint64(m.HomeNetworkNetId)) + } + return n +} + +func (m *SetHomeNetworkRoutingPolicyRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ForwarderNetId != 0 { + n += 1 + sovRoutingServices(uint64(m.ForwarderNetId)) + } + l = len(m.ForwarderId) + if l > 0 { + n += 1 + l + sovRoutingServices(uint64(l)) + } + if m.HomeNetworkNetId != 0 { + n += 1 + sovRoutingServices(uint64(m.HomeNetworkNetId)) + } + if m.Policy != nil { + l = m.Policy.Size() + n += 1 + l + sovRoutingServices(uint64(l)) + } + return n +} + +func (m *GetRoutingPolicyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Policy != nil { + l = m.Policy.Size() + n += 1 + l + sovRoutingServices(uint64(l)) + } + return n +} + +func (m *PublishUplinkMessageRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ForwarderNetId != 0 { + n += 1 + sovRoutingServices(uint64(m.ForwarderNetId)) + } + l = len(m.ForwarderId) + if l > 0 { + n += 1 + l + sovRoutingServices(uint64(l)) + } + if m.Message != nil { + l = m.Message.Size() + n += 1 + l + sovRoutingServices(uint64(l)) + } + return n +} + +func (m *PublishUplinkMessageResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovRoutingServices(uint64(l)) + } + if m.State != 0 { + n += 1 + sovRoutingServices(uint64(m.State)) + } + return n +} + +func (m *PublishDownlinkMessageRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.HomeNetworkNetId != 0 { + n += 1 + sovRoutingServices(uint64(m.HomeNetworkNetId)) + } + if m.ForwarderNetId != 0 { + n += 1 + sovRoutingServices(uint64(m.ForwarderNetId)) + } + l = len(m.ForwarderId) + if l > 0 { + n += 1 + l + sovRoutingServices(uint64(l)) + } + if m.Message != nil { + l = m.Message.Size() + n += 1 + l + sovRoutingServices(uint64(l)) + } + return n +} + +func (m *PublishDownlinkMessageResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovRoutingServices(uint64(l)) + } + if m.State != 0 { + n += 1 + sovRoutingServices(uint64(m.State)) + } + return n +} + +func (m *SubscribeForwarderRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ForwarderNetId != 0 { + n += 1 + sovRoutingServices(uint64(m.ForwarderNetId)) + } + l = len(m.ForwarderId) + if l > 0 { + n += 1 + l + sovRoutingServices(uint64(l)) + } + l = len(m.Group) + if l > 0 { + n += 1 + l + sovRoutingServices(uint64(l)) + } + return n +} + +func (m *SubscribeHomeNetworkRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.HomeNetworkNetId != 0 { + n += 1 + sovRoutingServices(uint64(m.HomeNetworkNetId)) + } + if len(m.Filters) > 0 { + for _, e := range m.Filters { + l = e.Size() + n += 1 + l + sovRoutingServices(uint64(l)) + } + } + l = len(m.Group) + if l > 0 { + n += 1 + l + sovRoutingServices(uint64(l)) + } + return n +} + +func (m *RouteUplinkMessageRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Message != nil { + l = m.Message.Size() + n += 1 + l + sovRoutingServices(uint64(l)) + } + return n +} + +func (m *RouteDownlinkMessageRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Message != nil { + l = m.Message.Size() + n += 1 + l + sovRoutingServices(uint64(l)) + } + return n +} + +func (m *RouteMessageResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.State != 0 { + n += 1 + sovRoutingServices(uint64(m.State)) + } + return n +} + +func sovRoutingServices(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozRoutingServices(x uint64) (n int) { + return sovRoutingServices(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GetDefaultRoutingPolicyRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetDefaultRoutingPolicyRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetDefaultRoutingPolicyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderNetId", wireType) + } + m.ForwarderNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ForwarderNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRoutingServices + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRoutingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForwarderId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRoutingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SetDefaultRoutingPolicyRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SetDefaultRoutingPolicyRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SetDefaultRoutingPolicyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderNetId", wireType) + } + m.ForwarderNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ForwarderNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRoutingServices + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRoutingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForwarderId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Policy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRoutingServices + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRoutingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Policy == nil { + m.Policy = &RoutingPolicy{} + } + if err := m.Policy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRoutingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetHomeNetworkRoutingPolicyRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetHomeNetworkRoutingPolicyRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetHomeNetworkRoutingPolicyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderNetId", wireType) + } + m.ForwarderNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ForwarderNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRoutingServices + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRoutingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForwarderId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HomeNetworkNetId", wireType) + } + m.HomeNetworkNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HomeNetworkNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRoutingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SetHomeNetworkRoutingPolicyRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SetHomeNetworkRoutingPolicyRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SetHomeNetworkRoutingPolicyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderNetId", wireType) + } + m.ForwarderNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ForwarderNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRoutingServices + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRoutingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForwarderId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HomeNetworkNetId", wireType) + } + m.HomeNetworkNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HomeNetworkNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Policy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRoutingServices + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRoutingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Policy == nil { + m.Policy = &RoutingPolicy{} + } + if err := m.Policy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRoutingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetRoutingPolicyResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetRoutingPolicyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetRoutingPolicyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Policy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRoutingServices + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRoutingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Policy == nil { + m.Policy = &RoutingPolicy{} + } + if err := m.Policy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRoutingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PublishUplinkMessageRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PublishUplinkMessageRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PublishUplinkMessageRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderNetId", wireType) + } + m.ForwarderNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ForwarderNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRoutingServices + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRoutingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForwarderId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRoutingServices + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRoutingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Message == nil { + m.Message = &UplinkMessage{} + } + if err := m.Message.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRoutingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PublishUplinkMessageResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PublishUplinkMessageResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PublishUplinkMessageResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRoutingServices + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRoutingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= MessageDeliveryState(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRoutingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PublishDownlinkMessageRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PublishDownlinkMessageRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PublishDownlinkMessageRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HomeNetworkNetId", wireType) + } + m.HomeNetworkNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HomeNetworkNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderNetId", wireType) + } + m.ForwarderNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ForwarderNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRoutingServices + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRoutingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForwarderId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRoutingServices + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRoutingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Message == nil { + m.Message = &DownlinkMessage{} + } + if err := m.Message.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRoutingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PublishDownlinkMessageResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PublishDownlinkMessageResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PublishDownlinkMessageResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRoutingServices + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRoutingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= MessageDeliveryState(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRoutingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubscribeForwarderRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubscribeForwarderRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubscribeForwarderRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderNetId", wireType) + } + m.ForwarderNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ForwarderNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwarderId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRoutingServices + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRoutingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForwarderId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRoutingServices + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRoutingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Group = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRoutingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubscribeHomeNetworkRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubscribeHomeNetworkRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubscribeHomeNetworkRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HomeNetworkNetId", wireType) + } + m.HomeNetworkNetId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HomeNetworkNetId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRoutingServices + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRoutingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Filters = append(m.Filters, &RoutingFilter{}) + if err := m.Filters[len(m.Filters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRoutingServices + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRoutingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Group = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRoutingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RouteUplinkMessageRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RouteUplinkMessageRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RouteUplinkMessageRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRoutingServices + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRoutingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Message == nil { + m.Message = &RoutedUplinkMessage{} + } + if err := m.Message.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRoutingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RouteDownlinkMessageRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RouteDownlinkMessageRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RouteDownlinkMessageRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRoutingServices + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRoutingServices + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Message == nil { + m.Message = &RoutedDownlinkMessage{} + } + if err := m.Message.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRoutingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RouteMessageResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RouteMessageResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RouteMessageResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= MessageDeliveryState(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRoutingServices(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthRoutingServices + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipRoutingServices(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRoutingServices + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthRoutingServices + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupRoutingServices + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthRoutingServices + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthRoutingServices = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRoutingServices = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupRoutingServices = fmt.Errorf("proto: unexpected end of group") +)