From d9bd3d432e0970be9a0962aab4ffc8e522b40ffa Mon Sep 17 00:00:00 2001 From: Adam Wootton Date: Mon, 22 Apr 2024 15:27:21 -0400 Subject: [PATCH] remove unused protobuf stuff --- client.go | 54 +- client_test.go | 22 +- go.mod | 1 - go.sum | 7 - proto/helpers.go | 22 - proto/variableForUserParams.pb.go | 919 --------- proto/variableForUserParams.proto | 70 - proto/variableForUserParams_vtproto.pb.go | 2179 --------------------- 8 files changed, 3 insertions(+), 3271 deletions(-) delete mode 100644 proto/helpers.go delete mode 100644 proto/variableForUserParams.pb.go delete mode 100644 proto/variableForUserParams.proto delete mode 100644 proto/variableForUserParams_vtproto.pb.go diff --git a/client.go b/client.go index e005b9d0..35304b3f 100644 --- a/client.go +++ b/client.go @@ -20,7 +20,6 @@ import ( "github.com/devcyclehq/go-server-sdk/v2/util" "github.com/devcyclehq/go-server-sdk/v2/api" - "github.com/devcyclehq/go-server-sdk/v2/proto" "github.com/matryer/try" ) @@ -153,7 +152,7 @@ func (c *Client) IsLocalBucketing() bool { func (c *Client) handleInitialization() { c.isInitialized = true - if(c.IsLocalBucketing()){ + if c.IsLocalBucketing() { util.Infof("Client initialized with local bucketing %v", c.localBucketing.GetClientUUID()) } if c.DevCycleOptions.OnInitializedChannel != nil { @@ -184,57 +183,6 @@ func (c *Client) GetRawConfig() (config []byte, etag string, err error) { return nil, "", errors.New("cannot read raw config; config manager has no config") } -func createNullableString(val string) *proto.NullableString { - if val == "" { - return &proto.NullableString{Value: "", IsNull: true} - } else { - return &proto.NullableString{Value: val, IsNull: false} - } -} - -func createNullableDouble(val float64) *proto.NullableDouble { - if math.IsNaN(val) { - return &proto.NullableDouble{Value: 0, IsNull: true} - } else { - return &proto.NullableDouble{Value: val, IsNull: false} - } -} - -func createNullableCustomData(data map[string]interface{}) *proto.NullableCustomData { - dataMap := map[string]*proto.CustomDataValue{} - - if len(data) == 0 { - return &proto.NullableCustomData{ - Value: dataMap, - IsNull: true, - } - } - // pull the values from the map and convert to the nullable data objects for protobuf - for key, val := range data { - if val == nil { - dataMap[key] = &proto.CustomDataValue{Type: proto.CustomDataType_Null} - continue - } - - switch val := val.(type) { - case string: - dataMap[key] = &proto.CustomDataValue{Type: proto.CustomDataType_Str, StringValue: val} - case float64: - dataMap[key] = &proto.CustomDataValue{Type: proto.CustomDataType_Num, DoubleValue: val} - case bool: - dataMap[key] = &proto.CustomDataValue{Type: proto.CustomDataType_Bool, BoolValue: val} - default: - // if we don't know what it is, just set it to null - dataMap[key] = &proto.CustomDataValue{Type: proto.CustomDataType_Null} - } - } - - return &proto.NullableCustomData{ - Value: dataMap, - IsNull: false, - } -} - /* Get all features by key for user data - @param body diff --git a/client_test.go b/client_test.go index 7e4bf2c2..58782186 100644 --- a/client_test.go +++ b/client_test.go @@ -189,24 +189,6 @@ func TestClient_VariableEventIsQueued(t *testing.T) { require.NoError(t, err) } -func TestClient_VariableLocal(t *testing.T) { - httpmock.Activate() - defer httpmock.DeactivateAndReset() - httpConfigMock(200) - - c, err := NewClient(test_environmentKey, &Options{}) - fatalErr(t, err) - - user := User{UserId: "j_test", DeviceModel: "testing"} - variable, err := c.Variable(user, "test", true) - fatalErr(t, err) - fmt.Println(variable) - - variableValue, err := c.VariableValue(user, "test", true) - fatalErr(t, err) - fmt.Println(variableValue) -} - func TestClient_VariableLocalFlush(t *testing.T) { httpmock.Activate() defer httpmock.DeactivateAndReset() @@ -223,7 +205,7 @@ func TestClient_VariableLocalFlush(t *testing.T) { fmt.Println(variable) } -func TestClient_VariableLocalProtobuf(t *testing.T) { +func TestClient_VariableLocal(t *testing.T) { httpmock.Activate() defer httpmock.DeactivateAndReset() httpConfigMock(200) @@ -258,7 +240,7 @@ func TestClient_VariableLocalProtobuf(t *testing.T) { } } -func TestClient_VariableLocalProtobuf_UserWithCustomData(t *testing.T) { +func TestClient_VariableLocal_UserWithCustomData(t *testing.T) { httpmock.Activate() defer httpmock.DeactivateAndReset() httpConfigMock(200) diff --git a/go.mod b/go.mod index de0d7f3e..689edf5d 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,6 @@ require ( github.com/open-feature/go-sdk v1.8.0 github.com/stretchr/testify v1.8.4 github.com/twmb/murmur3 v1.1.7 - google.golang.org/protobuf v1.29.1 ) require ( diff --git a/go.sum b/go.sum index 87f24ca6..22a37598 100644 --- a/go.sum +++ b/go.sum @@ -14,9 +14,6 @@ github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91 github.com/go-playground/validator/v10 v10.18.0 h1:BvolUXjp4zuvkZ5YN5t7ebzbhlUtPsPm2S9NAZ5nl9U= github.com/go-playground/validator/v10 v10.18.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/jarcoal/httpmock v1.2.0 h1:gSvTxxFR/MEMfsGrvRbdfpRUMBStovlSRLw0Ep1bwwc= @@ -49,10 +46,6 @@ golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.29.1 h1:7QBf+IK2gx70Ap/hDsOmam3GE0v9HicjfEdAxE62UoM= -google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/proto/helpers.go b/proto/helpers.go deleted file mode 100644 index 4969b022..00000000 --- a/proto/helpers.go +++ /dev/null @@ -1,22 +0,0 @@ -package proto - -import "encoding/json" - -func (variable SDKVariable_PB) GetValue() interface{} { - switch variable.Type { - case VariableType_PB_Boolean: - return variable.BoolValue - case VariableType_PB_Number: - return variable.DoubleValue - case VariableType_PB_String: - return variable.StringValue - case VariableType_PB_JSON: - var result interface{} - err := json.Unmarshal([]byte(variable.StringValue), &result) - if err != nil { - return nil - } - return result - } - return nil -} diff --git a/proto/variableForUserParams.pb.go b/proto/variableForUserParams.pb.go deleted file mode 100644 index 99cffb96..00000000 --- a/proto/variableForUserParams.pb.go +++ /dev/null @@ -1,919 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc v3.21.12 -// source: proto/variableForUserParams.proto - -package proto - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type VariableType_PB int32 - -const ( - VariableType_PB_Boolean VariableType_PB = 0 - VariableType_PB_Number VariableType_PB = 1 - VariableType_PB_String VariableType_PB = 2 - VariableType_PB_JSON VariableType_PB = 3 -) - -// Enum value maps for VariableType_PB. -var ( - VariableType_PB_name = map[int32]string{ - 0: "Boolean", - 1: "Number", - 2: "String", - 3: "JSON", - } - VariableType_PB_value = map[string]int32{ - "Boolean": 0, - "Number": 1, - "String": 2, - "JSON": 3, - } -) - -func (x VariableType_PB) Enum() *VariableType_PB { - p := new(VariableType_PB) - *p = x - return p -} - -func (x VariableType_PB) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (VariableType_PB) Descriptor() protoreflect.EnumDescriptor { - return file_proto_variableForUserParams_proto_enumTypes[0].Descriptor() -} - -func (VariableType_PB) Type() protoreflect.EnumType { - return &file_proto_variableForUserParams_proto_enumTypes[0] -} - -func (x VariableType_PB) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use VariableType_PB.Descriptor instead. -func (VariableType_PB) EnumDescriptor() ([]byte, []int) { - return file_proto_variableForUserParams_proto_rawDescGZIP(), []int{0} -} - -type CustomDataType int32 - -const ( - CustomDataType_Bool CustomDataType = 0 - CustomDataType_Num CustomDataType = 1 - CustomDataType_Str CustomDataType = 2 - CustomDataType_Null CustomDataType = 3 -) - -// Enum value maps for CustomDataType. -var ( - CustomDataType_name = map[int32]string{ - 0: "Bool", - 1: "Num", - 2: "Str", - 3: "Null", - } - CustomDataType_value = map[string]int32{ - "Bool": 0, - "Num": 1, - "Str": 2, - "Null": 3, - } -) - -func (x CustomDataType) Enum() *CustomDataType { - p := new(CustomDataType) - *p = x - return p -} - -func (x CustomDataType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CustomDataType) Descriptor() protoreflect.EnumDescriptor { - return file_proto_variableForUserParams_proto_enumTypes[1].Descriptor() -} - -func (CustomDataType) Type() protoreflect.EnumType { - return &file_proto_variableForUserParams_proto_enumTypes[1] -} - -func (x CustomDataType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CustomDataType.Descriptor instead. -func (CustomDataType) EnumDescriptor() ([]byte, []int) { - return file_proto_variableForUserParams_proto_rawDescGZIP(), []int{1} -} - -type NullableString struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - IsNull bool `protobuf:"varint,2,opt,name=isNull,proto3" json:"isNull,omitempty"` -} - -func (x *NullableString) Reset() { - *x = NullableString{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_variableForUserParams_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NullableString) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NullableString) ProtoMessage() {} - -func (x *NullableString) ProtoReflect() protoreflect.Message { - mi := &file_proto_variableForUserParams_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NullableString.ProtoReflect.Descriptor instead. -func (*NullableString) Descriptor() ([]byte, []int) { - return file_proto_variableForUserParams_proto_rawDescGZIP(), []int{0} -} - -func (x *NullableString) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -func (x *NullableString) GetIsNull() bool { - if x != nil { - return x.IsNull - } - return false -} - -type NullableDouble struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` - IsNull bool `protobuf:"varint,2,opt,name=isNull,proto3" json:"isNull,omitempty"` -} - -func (x *NullableDouble) Reset() { - *x = NullableDouble{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_variableForUserParams_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NullableDouble) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NullableDouble) ProtoMessage() {} - -func (x *NullableDouble) ProtoReflect() protoreflect.Message { - mi := &file_proto_variableForUserParams_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NullableDouble.ProtoReflect.Descriptor instead. -func (*NullableDouble) Descriptor() ([]byte, []int) { - return file_proto_variableForUserParams_proto_rawDescGZIP(), []int{1} -} - -func (x *NullableDouble) GetValue() float64 { - if x != nil { - return x.Value - } - return 0 -} - -func (x *NullableDouble) GetIsNull() bool { - if x != nil { - return x.IsNull - } - return false -} - -type CustomDataValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type CustomDataType `protobuf:"varint,1,opt,name=type,proto3,enum=CustomDataType" json:"type,omitempty"` - BoolValue bool `protobuf:"varint,2,opt,name=boolValue,proto3" json:"boolValue,omitempty"` - DoubleValue float64 `protobuf:"fixed64,3,opt,name=doubleValue,proto3" json:"doubleValue,omitempty"` - StringValue string `protobuf:"bytes,4,opt,name=stringValue,proto3" json:"stringValue,omitempty"` -} - -func (x *CustomDataValue) Reset() { - *x = CustomDataValue{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_variableForUserParams_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CustomDataValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CustomDataValue) ProtoMessage() {} - -func (x *CustomDataValue) ProtoReflect() protoreflect.Message { - mi := &file_proto_variableForUserParams_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CustomDataValue.ProtoReflect.Descriptor instead. -func (*CustomDataValue) Descriptor() ([]byte, []int) { - return file_proto_variableForUserParams_proto_rawDescGZIP(), []int{2} -} - -func (x *CustomDataValue) GetType() CustomDataType { - if x != nil { - return x.Type - } - return CustomDataType_Bool -} - -func (x *CustomDataValue) GetBoolValue() bool { - if x != nil { - return x.BoolValue - } - return false -} - -func (x *CustomDataValue) GetDoubleValue() float64 { - if x != nil { - return x.DoubleValue - } - return 0 -} - -func (x *CustomDataValue) GetStringValue() string { - if x != nil { - return x.StringValue - } - return "" -} - -type NullableCustomData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Value map[string]*CustomDataValue `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - IsNull bool `protobuf:"varint,2,opt,name=isNull,proto3" json:"isNull,omitempty"` -} - -func (x *NullableCustomData) Reset() { - *x = NullableCustomData{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_variableForUserParams_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NullableCustomData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NullableCustomData) ProtoMessage() {} - -func (x *NullableCustomData) ProtoReflect() protoreflect.Message { - mi := &file_proto_variableForUserParams_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NullableCustomData.ProtoReflect.Descriptor instead. -func (*NullableCustomData) Descriptor() ([]byte, []int) { - return file_proto_variableForUserParams_proto_rawDescGZIP(), []int{3} -} - -func (x *NullableCustomData) GetValue() map[string]*CustomDataValue { - if x != nil { - return x.Value - } - return nil -} - -func (x *NullableCustomData) GetIsNull() bool { - if x != nil { - return x.IsNull - } - return false -} - -type VariableForUserParams_PB struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SdkKey string `protobuf:"bytes,1,opt,name=sdkKey,proto3" json:"sdkKey,omitempty"` - VariableKey string `protobuf:"bytes,2,opt,name=variableKey,proto3" json:"variableKey,omitempty"` - VariableType VariableType_PB `protobuf:"varint,3,opt,name=variableType,proto3,enum=VariableType_PB" json:"variableType,omitempty"` - User *DVCUser_PB `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"` - ShouldTrackEvent bool `protobuf:"varint,5,opt,name=shouldTrackEvent,proto3" json:"shouldTrackEvent,omitempty"` -} - -func (x *VariableForUserParams_PB) Reset() { - *x = VariableForUserParams_PB{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_variableForUserParams_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VariableForUserParams_PB) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VariableForUserParams_PB) ProtoMessage() {} - -func (x *VariableForUserParams_PB) ProtoReflect() protoreflect.Message { - mi := &file_proto_variableForUserParams_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VariableForUserParams_PB.ProtoReflect.Descriptor instead. -func (*VariableForUserParams_PB) Descriptor() ([]byte, []int) { - return file_proto_variableForUserParams_proto_rawDescGZIP(), []int{4} -} - -func (x *VariableForUserParams_PB) GetSdkKey() string { - if x != nil { - return x.SdkKey - } - return "" -} - -func (x *VariableForUserParams_PB) GetVariableKey() string { - if x != nil { - return x.VariableKey - } - return "" -} - -func (x *VariableForUserParams_PB) GetVariableType() VariableType_PB { - if x != nil { - return x.VariableType - } - return VariableType_PB_Boolean -} - -func (x *VariableForUserParams_PB) GetUser() *DVCUser_PB { - if x != nil { - return x.User - } - return nil -} - -func (x *VariableForUserParams_PB) GetShouldTrackEvent() bool { - if x != nil { - return x.ShouldTrackEvent - } - return false -} - -type DVCUser_PB struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - Email *NullableString `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` - Name *NullableString `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Language *NullableString `protobuf:"bytes,4,opt,name=language,proto3" json:"language,omitempty"` - Country *NullableString `protobuf:"bytes,5,opt,name=country,proto3" json:"country,omitempty"` - AppBuild *NullableDouble `protobuf:"bytes,6,opt,name=appBuild,proto3" json:"appBuild,omitempty"` - AppVersion *NullableString `protobuf:"bytes,7,opt,name=appVersion,proto3" json:"appVersion,omitempty"` - DeviceModel *NullableString `protobuf:"bytes,8,opt,name=deviceModel,proto3" json:"deviceModel,omitempty"` - CustomData *NullableCustomData `protobuf:"bytes,9,opt,name=customData,proto3" json:"customData,omitempty"` - PrivateCustomData *NullableCustomData `protobuf:"bytes,10,opt,name=privateCustomData,proto3" json:"privateCustomData,omitempty"` -} - -func (x *DVCUser_PB) Reset() { - *x = DVCUser_PB{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_variableForUserParams_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DVCUser_PB) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DVCUser_PB) ProtoMessage() {} - -func (x *DVCUser_PB) ProtoReflect() protoreflect.Message { - mi := &file_proto_variableForUserParams_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DVCUser_PB.ProtoReflect.Descriptor instead. -func (*DVCUser_PB) Descriptor() ([]byte, []int) { - return file_proto_variableForUserParams_proto_rawDescGZIP(), []int{5} -} - -func (x *DVCUser_PB) GetUserId() string { - if x != nil { - return x.UserId - } - return "" -} - -func (x *DVCUser_PB) GetEmail() *NullableString { - if x != nil { - return x.Email - } - return nil -} - -func (x *DVCUser_PB) GetName() *NullableString { - if x != nil { - return x.Name - } - return nil -} - -func (x *DVCUser_PB) GetLanguage() *NullableString { - if x != nil { - return x.Language - } - return nil -} - -func (x *DVCUser_PB) GetCountry() *NullableString { - if x != nil { - return x.Country - } - return nil -} - -func (x *DVCUser_PB) GetAppBuild() *NullableDouble { - if x != nil { - return x.AppBuild - } - return nil -} - -func (x *DVCUser_PB) GetAppVersion() *NullableString { - if x != nil { - return x.AppVersion - } - return nil -} - -func (x *DVCUser_PB) GetDeviceModel() *NullableString { - if x != nil { - return x.DeviceModel - } - return nil -} - -func (x *DVCUser_PB) GetCustomData() *NullableCustomData { - if x != nil { - return x.CustomData - } - return nil -} - -func (x *DVCUser_PB) GetPrivateCustomData() *NullableCustomData { - if x != nil { - return x.PrivateCustomData - } - return nil -} - -type SDKVariable_PB struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - XId string `protobuf:"bytes,1,opt,name=_id,json=Id,proto3" json:"_id,omitempty"` - Type VariableType_PB `protobuf:"varint,2,opt,name=type,proto3,enum=VariableType_PB" json:"type,omitempty"` - Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` - BoolValue bool `protobuf:"varint,4,opt,name=boolValue,proto3" json:"boolValue,omitempty"` - DoubleValue float64 `protobuf:"fixed64,5,opt,name=doubleValue,proto3" json:"doubleValue,omitempty"` - StringValue string `protobuf:"bytes,6,opt,name=stringValue,proto3" json:"stringValue,omitempty"` - EvalReason *NullableString `protobuf:"bytes,7,opt,name=evalReason,proto3" json:"evalReason,omitempty"` -} - -func (x *SDKVariable_PB) Reset() { - *x = SDKVariable_PB{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_variableForUserParams_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SDKVariable_PB) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SDKVariable_PB) ProtoMessage() {} - -func (x *SDKVariable_PB) ProtoReflect() protoreflect.Message { - mi := &file_proto_variableForUserParams_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SDKVariable_PB.ProtoReflect.Descriptor instead. -func (*SDKVariable_PB) Descriptor() ([]byte, []int) { - return file_proto_variableForUserParams_proto_rawDescGZIP(), []int{6} -} - -func (x *SDKVariable_PB) GetXId() string { - if x != nil { - return x.XId - } - return "" -} - -func (x *SDKVariable_PB) GetType() VariableType_PB { - if x != nil { - return x.Type - } - return VariableType_PB_Boolean -} - -func (x *SDKVariable_PB) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *SDKVariable_PB) GetBoolValue() bool { - if x != nil { - return x.BoolValue - } - return false -} - -func (x *SDKVariable_PB) GetDoubleValue() float64 { - if x != nil { - return x.DoubleValue - } - return 0 -} - -func (x *SDKVariable_PB) GetStringValue() string { - if x != nil { - return x.StringValue - } - return "" -} - -func (x *SDKVariable_PB) GetEvalReason() *NullableString { - if x != nil { - return x.EvalReason - } - return nil -} - -var File_proto_variableForUserParams_proto protoreflect.FileDescriptor - -var file_proto_variableForUserParams_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x3e, 0x0a, 0x0e, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, - 0x73, 0x4e, 0x75, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x4e, - 0x75, 0x6c, 0x6c, 0x22, 0x3e, 0x0a, 0x0e, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x44, - 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, - 0x73, 0x4e, 0x75, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x4e, - 0x75, 0x6c, 0x6c, 0x22, 0x98, 0x01, 0x0a, 0x0f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x61, - 0x74, 0x61, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x61, - 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x6f, - 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, - 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x20, 0x0a, 0x0b, - 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xae, - 0x01, 0x0a, 0x12, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x44, 0x61, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, - 0x73, 0x4e, 0x75, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x4e, - 0x75, 0x6c, 0x6c, 0x1a, 0x4a, 0x0a, 0x0a, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0xd7, 0x01, 0x0a, 0x18, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x55, - 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x50, 0x42, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x64, 0x6b, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x64, - 0x6b, 0x4b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, - 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x61, 0x72, 0x69, 0x61, - 0x62, 0x6c, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x0c, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, - 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x56, - 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x42, 0x52, 0x0c, - 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x04, - 0x75, 0x73, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x56, 0x43, - 0x55, 0x73, 0x65, 0x72, 0x5f, 0x50, 0x42, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x2a, 0x0a, - 0x10, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x54, - 0x72, 0x61, 0x63, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x22, 0xd2, 0x03, 0x0a, 0x0a, 0x44, 0x56, - 0x43, 0x55, 0x73, 0x65, 0x72, 0x5f, 0x50, 0x42, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x25, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0f, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x23, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, - 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, - 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0f, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x4e, 0x75, - 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x2b, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x42, 0x75, 0x69, 0x6c, - 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, - 0x6c, 0x65, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x08, 0x61, 0x70, 0x70, 0x42, 0x75, 0x69, - 0x6c, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, - 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x6f, 0x64, - 0x65, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x61, - 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x33, 0x0a, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x44, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x4e, 0x75, 0x6c, - 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x12, 0x41, 0x0a, 0x11, 0x70, - 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, - 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x11, 0x70, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x22, 0xec, - 0x01, 0x0a, 0x0e, 0x53, 0x44, 0x4b, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x50, - 0x42, 0x12, 0x0f, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x49, 0x64, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x10, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, - 0x50, 0x42, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x6f, - 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x62, - 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x6f, 0x75, 0x62, - 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, - 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2f, 0x0a, 0x0a, - 0x65, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0f, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x0a, 0x65, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x2a, 0x40, 0x0a, - 0x0f, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x42, - 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x10, 0x00, 0x12, 0x0a, 0x0a, - 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x03, 0x2a, - 0x36, 0x0a, 0x0e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x6f, 0x6f, 0x6c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4e, - 0x75, 0x6d, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x74, 0x72, 0x10, 0x02, 0x12, 0x08, 0x0a, - 0x04, 0x4e, 0x75, 0x6c, 0x6c, 0x10, 0x03, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_variableForUserParams_proto_rawDescOnce sync.Once - file_proto_variableForUserParams_proto_rawDescData = file_proto_variableForUserParams_proto_rawDesc -) - -func file_proto_variableForUserParams_proto_rawDescGZIP() []byte { - file_proto_variableForUserParams_proto_rawDescOnce.Do(func() { - file_proto_variableForUserParams_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_variableForUserParams_proto_rawDescData) - }) - return file_proto_variableForUserParams_proto_rawDescData -} - -var file_proto_variableForUserParams_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_proto_variableForUserParams_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_proto_variableForUserParams_proto_goTypes = []interface{}{ - (VariableType_PB)(0), // 0: VariableType_PB - (CustomDataType)(0), // 1: CustomDataType - (*NullableString)(nil), // 2: NullableString - (*NullableDouble)(nil), // 3: NullableDouble - (*CustomDataValue)(nil), // 4: CustomDataValue - (*NullableCustomData)(nil), // 5: NullableCustomData - (*VariableForUserParams_PB)(nil), // 6: VariableForUserParams_PB - (*DVCUser_PB)(nil), // 7: DVCUser_PB - (*SDKVariable_PB)(nil), // 8: SDKVariable_PB - nil, // 9: NullableCustomData.ValueEntry -} -var file_proto_variableForUserParams_proto_depIdxs = []int32{ - 1, // 0: CustomDataValue.type:type_name -> CustomDataType - 9, // 1: NullableCustomData.value:type_name -> NullableCustomData.ValueEntry - 0, // 2: VariableForUserParams_PB.variableType:type_name -> VariableType_PB - 7, // 3: VariableForUserParams_PB.user:type_name -> DVCUser_PB - 2, // 4: DVCUser_PB.email:type_name -> NullableString - 2, // 5: DVCUser_PB.name:type_name -> NullableString - 2, // 6: DVCUser_PB.language:type_name -> NullableString - 2, // 7: DVCUser_PB.country:type_name -> NullableString - 3, // 8: DVCUser_PB.appBuild:type_name -> NullableDouble - 2, // 9: DVCUser_PB.appVersion:type_name -> NullableString - 2, // 10: DVCUser_PB.deviceModel:type_name -> NullableString - 5, // 11: DVCUser_PB.customData:type_name -> NullableCustomData - 5, // 12: DVCUser_PB.privateCustomData:type_name -> NullableCustomData - 0, // 13: SDKVariable_PB.type:type_name -> VariableType_PB - 2, // 14: SDKVariable_PB.evalReason:type_name -> NullableString - 4, // 15: NullableCustomData.ValueEntry.value:type_name -> CustomDataValue - 16, // [16:16] is the sub-list for method output_type - 16, // [16:16] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name -} - -func init() { file_proto_variableForUserParams_proto_init() } -func file_proto_variableForUserParams_proto_init() { - if File_proto_variableForUserParams_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_variableForUserParams_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NullableString); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_variableForUserParams_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NullableDouble); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_variableForUserParams_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CustomDataValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_variableForUserParams_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NullableCustomData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_variableForUserParams_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VariableForUserParams_PB); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_variableForUserParams_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DVCUser_PB); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_variableForUserParams_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SDKVariable_PB); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_variableForUserParams_proto_rawDesc, - NumEnums: 2, - NumMessages: 8, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_proto_variableForUserParams_proto_goTypes, - DependencyIndexes: file_proto_variableForUserParams_proto_depIdxs, - EnumInfos: file_proto_variableForUserParams_proto_enumTypes, - MessageInfos: file_proto_variableForUserParams_proto_msgTypes, - }.Build() - File_proto_variableForUserParams_proto = out.File - file_proto_variableForUserParams_proto_rawDesc = nil - file_proto_variableForUserParams_proto_goTypes = nil - file_proto_variableForUserParams_proto_depIdxs = nil -} diff --git a/proto/variableForUserParams.proto b/proto/variableForUserParams.proto deleted file mode 100644 index 31457702..00000000 --- a/proto/variableForUserParams.proto +++ /dev/null @@ -1,70 +0,0 @@ -syntax = "proto3"; - -option go_package = "./proto"; - -enum VariableType_PB { - Boolean = 0; - Number = 1; - String = 2; - JSON = 3; -} - -message NullableString { - string value = 1; - bool isNull = 2; -} - -message NullableDouble { - double value = 1; - bool isNull = 2; -} - -enum CustomDataType { - Bool = 0; - Num = 1; - Str = 2; - Null = 3; -} - -message CustomDataValue { - CustomDataType type = 1; - bool boolValue = 2; - double doubleValue = 3; - string stringValue = 4; -} - -message NullableCustomData { - map value = 1; - bool isNull = 2; -} - -message VariableForUserParams_PB { - string sdkKey = 1; - string variableKey = 2; - VariableType_PB variableType = 3; - DVCUser_PB user = 4; - bool shouldTrackEvent = 5; -} - -message DVCUser_PB { - string user_id = 1; - NullableString email = 2; - NullableString name = 3; - NullableString language = 4; - NullableString country = 5; - NullableDouble appBuild = 6; - NullableString appVersion = 7; - NullableString deviceModel = 8; - NullableCustomData customData = 9; - NullableCustomData privateCustomData = 10; -} - -message SDKVariable_PB { - string _id = 1; - VariableType_PB type = 2; - string key = 3; - bool boolValue = 4; - double doubleValue = 5; - string stringValue = 6; - NullableString evalReason = 7; -} diff --git a/proto/variableForUserParams_vtproto.pb.go b/proto/variableForUserParams_vtproto.pb.go deleted file mode 100644 index 960c20a0..00000000 --- a/proto/variableForUserParams_vtproto.pb.go +++ /dev/null @@ -1,2179 +0,0 @@ -// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 -// source: proto/variableForUserParams.proto - -package proto - -import ( - binary "encoding/binary" - fmt "fmt" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - math "math" - bits "math/bits" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -func (m *NullableString) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NullableString) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *NullableString) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.IsNull { - i-- - if m.IsNull { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarint(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *NullableDouble) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NullableDouble) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *NullableDouble) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.IsNull { - i-- - if m.IsNull { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.Value != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) - i-- - dAtA[i] = 0x9 - } - return len(dAtA) - i, nil -} - -func (m *CustomDataValue) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomDataValue) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *CustomDataValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.StringValue) > 0 { - i -= len(m.StringValue) - copy(dAtA[i:], m.StringValue) - i = encodeVarint(dAtA, i, uint64(len(m.StringValue))) - i-- - dAtA[i] = 0x22 - } - if m.DoubleValue != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DoubleValue)))) - i-- - dAtA[i] = 0x19 - } - if m.BoolValue { - i-- - if m.BoolValue { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.Type != 0 { - i = encodeVarint(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *NullableCustomData) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NullableCustomData) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *NullableCustomData) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.IsNull { - i-- - if m.IsNull { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.Value) > 0 { - for k := range m.Value { - v := m.Value[k] - baseI := i - size, err := v.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *VariableForUserParams_PB) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *VariableForUserParams_PB) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *VariableForUserParams_PB) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.ShouldTrackEvent { - i-- - if m.ShouldTrackEvent { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.User != nil { - size, err := m.User.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - if m.VariableType != 0 { - i = encodeVarint(dAtA, i, uint64(m.VariableType)) - i-- - dAtA[i] = 0x18 - } - if len(m.VariableKey) > 0 { - i -= len(m.VariableKey) - copy(dAtA[i:], m.VariableKey) - i = encodeVarint(dAtA, i, uint64(len(m.VariableKey))) - i-- - dAtA[i] = 0x12 - } - if len(m.SdkKey) > 0 { - i -= len(m.SdkKey) - copy(dAtA[i:], m.SdkKey) - i = encodeVarint(dAtA, i, uint64(len(m.SdkKey))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DVCUser_PB) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DVCUser_PB) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *DVCUser_PB) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.PrivateCustomData != nil { - size, err := m.PrivateCustomData.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x52 - } - if m.CustomData != nil { - size, err := m.CustomData.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x4a - } - if m.DeviceModel != nil { - size, err := m.DeviceModel.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x42 - } - if m.AppVersion != nil { - size, err := m.AppVersion.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x3a - } - if m.AppBuild != nil { - size, err := m.AppBuild.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 - } - if m.Country != nil { - size, err := m.Country.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a - } - if m.Language != nil { - size, err := m.Language.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - if m.Name != nil { - size, err := m.Name.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - if m.Email != nil { - size, err := m.Email.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } - if len(m.UserId) > 0 { - i -= len(m.UserId) - copy(dAtA[i:], m.UserId) - i = encodeVarint(dAtA, i, uint64(len(m.UserId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SDKVariable_PB) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SDKVariable_PB) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *SDKVariable_PB) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.EvalReason != nil { - size, err := m.EvalReason.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x3a - } - if len(m.StringValue) > 0 { - i -= len(m.StringValue) - copy(dAtA[i:], m.StringValue) - i = encodeVarint(dAtA, i, uint64(len(m.StringValue))) - i-- - dAtA[i] = 0x32 - } - if m.DoubleValue != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DoubleValue)))) - i-- - dAtA[i] = 0x29 - } - if m.BoolValue { - i-- - if m.BoolValue { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarint(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x1a - } - if m.Type != 0 { - i = encodeVarint(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x10 - } - if len(m.XId) > 0 { - i -= len(m.XId) - copy(dAtA[i:], m.XId) - i = encodeVarint(dAtA, i, uint64(len(m.XId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarint(dAtA []byte, offset int, v uint64) int { - offset -= sov(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *NullableString) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Value) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.IsNull { - n += 2 - } - n += len(m.unknownFields) - return n -} - -func (m *NullableDouble) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != 0 { - n += 9 - } - if m.IsNull { - n += 2 - } - n += len(m.unknownFields) - return n -} - -func (m *CustomDataValue) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + sov(uint64(m.Type)) - } - if m.BoolValue { - n += 2 - } - if m.DoubleValue != 0 { - n += 9 - } - l = len(m.StringValue) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *NullableCustomData) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Value) > 0 { - for k, v := range m.Value { - _ = k - _ = v - l = 0 - if v != nil { - l = v.SizeVT() - } - l += 1 + sov(uint64(l)) - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) - } - } - if m.IsNull { - n += 2 - } - n += len(m.unknownFields) - return n -} - -func (m *VariableForUserParams_PB) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SdkKey) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.VariableKey) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.VariableType != 0 { - n += 1 + sov(uint64(m.VariableType)) - } - if m.User != nil { - l = m.User.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.ShouldTrackEvent { - n += 2 - } - n += len(m.unknownFields) - return n -} - -func (m *DVCUser_PB) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.UserId) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.Email != nil { - l = m.Email.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.Name != nil { - l = m.Name.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.Language != nil { - l = m.Language.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.Country != nil { - l = m.Country.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.AppBuild != nil { - l = m.AppBuild.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.AppVersion != nil { - l = m.AppVersion.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.DeviceModel != nil { - l = m.DeviceModel.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.CustomData != nil { - l = m.CustomData.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.PrivateCustomData != nil { - l = m.PrivateCustomData.SizeVT() - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *SDKVariable_PB) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.XId) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.Type != 0 { - n += 1 + sov(uint64(m.Type)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.BoolValue { - n += 2 - } - if m.DoubleValue != 0 { - n += 9 - } - l = len(m.StringValue) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.EvalReason != nil { - l = m.EvalReason.SizeVT() - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func sov(x uint64) (n int) { - return (bits.Len64(x|1) + 6) / 7 -} -func soz(x uint64) (n int) { - return sov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *NullableString) UnmarshalVT(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 ErrIntOverflow - } - 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: NullableString: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NullableString: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - 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 ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsNull", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsNull = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NullableDouble) UnmarshalVT(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 ErrIntOverflow - } - 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: NullableDouble: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NullableDouble: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = float64(math.Float64frombits(v)) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsNull", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsNull = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomDataValue) UnmarshalVT(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 ErrIntOverflow - } - 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: CustomDataValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomDataValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= CustomDataType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.BoolValue = bool(v != 0) - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field DoubleValue", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.DoubleValue = float64(math.Float64frombits(v)) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - 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 ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StringValue = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NullableCustomData) UnmarshalVT(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 ErrIntOverflow - } - 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: NullableCustomData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NullableCustomData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - 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 ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = make(map[string]*CustomDataValue) - } - var mapkey string - var mapvalue *CustomDataValue - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - 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 ErrIntOverflow - } - 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 ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLength - } - 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 ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLength - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLength - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &CustomDataValue{} - if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Value[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsNull", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsNull = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VariableForUserParams_PB) UnmarshalVT(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 ErrIntOverflow - } - 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: VariableForUserParams_PB: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VariableForUserParams_PB: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SdkKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - 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 ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SdkKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VariableKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - 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 ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VariableKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VariableType", wireType) - } - m.VariableType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.VariableType |= VariableType_PB(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.User == nil { - m.User = &DVCUser_PB{} - } - if err := m.User.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ShouldTrackEvent", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ShouldTrackEvent = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DVCUser_PB) UnmarshalVT(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 ErrIntOverflow - } - 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: DVCUser_PB: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DVCUser_PB: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - 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 ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Email", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Email == nil { - m.Email = &NullableString{} - } - if err := m.Email.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Name == nil { - m.Name = &NullableString{} - } - if err := m.Name.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Language", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Language == nil { - m.Language = &NullableString{} - } - if err := m.Language.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Country", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Country == nil { - m.Country = &NullableString{} - } - if err := m.Country.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppBuild", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AppBuild == nil { - m.AppBuild = &NullableDouble{} - } - if err := m.AppBuild.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppVersion", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AppVersion == nil { - m.AppVersion = &NullableString{} - } - if err := m.AppVersion.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeviceModel", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DeviceModel == nil { - m.DeviceModel = &NullableString{} - } - if err := m.DeviceModel.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CustomData == nil { - m.CustomData = &NullableCustomData{} - } - if err := m.CustomData.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrivateCustomData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PrivateCustomData == nil { - m.PrivateCustomData = &NullableCustomData{} - } - if err := m.PrivateCustomData.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SDKVariable_PB) UnmarshalVT(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 ErrIntOverflow - } - 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: SDKVariable_PB: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SDKVariable_PB: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field XId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - 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 ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.XId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= VariableType_PB(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - 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 ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.BoolValue = bool(v != 0) - case 5: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field DoubleValue", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.DoubleValue = float64(math.Float64frombits(v)) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - 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 ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StringValue = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EvalReason", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EvalReason == nil { - m.EvalReason = &NullableString{} - } - if err := m.EvalReason.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} - -func skip(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, ErrIntOverflow - } - 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, ErrIntOverflow - } - 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, ErrIntOverflow - } - 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, ErrInvalidLength - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroup - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLength - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflow = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") -)